[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Socket socket=new Socket() Javafags will defend this writing

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 60
Thread images: 4

File: 732943592.jpg (158KB, 292x380px) Image search: [Google]
732943592.jpg
158KB, 292x380px
Socket socket=new Socket()


Javafags will defend this writing socket thrice before I get my fucking socket

>pic related has more examples of absolutely fucking retarded verbosity
>>
>>55323531
Object s = new Socket();

There, only write it once
>>
>>55323531
Only Nemerle did it right
def s=Socket();

def means immutable by the way.
>>
>>55323531
You disgusting inbred, how much do you suck at OO to not even get that one never initializes objects explicitly outside of "hello world"-level toy code samples.
>>
>>55323758
>implying OOP isn't literally the kiddie programming paradigm
>>
>>55323758
This.

>using new
>2016

Are you even a programmer?
>>
Runtime runtime = Runtime.getRuntime();


:^)
>>
>>55323895
Runtime runtime = (Runtime)Runtime.getRuntime();//just to make sure it's Runtime
>>
File: run-forrest-run.jpg (13KB, 300x225px) Image search: [Google]
run-forrest-run.jpg
13KB, 300x225px
>>55323895
>>55323930
Runtime.run()
>>
>>55323758
I'm suck at OO. What do you use in the real world?
>>
>>55323895
>using the smiley with a carat nose
>>
>>55323758
>Muh factories
>Muh builders
>>
public class GPUThread {
public static void main(String[] args) {
System.out.println("AMD or Nvidia?");
}
}
>>
>>55324139
Intel

Just werks, play anything on high at 1080p.
>>
>>55324139
Was zur Hölle.
>>
Stay in school, kids! That way you won't end up like most people in this thread who have obviously never worked a day in their life.
>>
>>55324460
Most CS majors are useless.

Many can't even average two ints in C
>>
File: 1466993838416.jpg (132KB, 391x311px) Image search: [Google]
1466993838416.jpg
132KB, 391x311px
>>55323984
Dependency injection
>>
>>55324479
Went will you faggots realize that NONE of that matters? What matters is if you can make money. If you make money writing outdated shitty code, so be it. But that's not even the issue at hand. You people are boycotting the industry's most celebrated paradigm. Fucking retards on this board, I swear. If I had a button right here that would kill everyone on this board, including me, I would push it.
>>
var socket = new Socket();

C#
>>
>>55323822
>>55323814
>>55323758
Clearly not college grads. Let me guess... coding bootcamp? Keep telling yourself that a bunch of jew dropouts made a website that can actually compete with Princeton's education quality. I want to see what kind of mental gymnastics you can pull off on yourself here.
>>
>>55324547
See >>55324506
>>
>>55323531
I know, typing is so hard...
>>
>>55324506
How does that make you not use the "new" keyword?
>>
>>55324576
Just head over to the mechanical keyboard thread and invest into a keyboard that will make your life easier!
>>
>>55324702
Are you actually fucking retarded?
>>
>>55324783
Saying I'm retarded is pretty rude coming from someone not being able to answer a retarded question properly.
>>
>>55324821
People use frameworks for depdency injection, like guice. New is never used
>>
>>55324842
How do the people writing these framework avoid using new?
>>
>>55324842
>muh pointless framework and layers of needless abstractions and overengineering and muh design patterns and shit
fuck oopfags
>>
>>55324576
When I read code I don't want to be distracted by fluff
>>
>>55324857
They don't. Javascript kiddos only like to think about the most top level shit possible. No problem if it runs like trash.
>>
>>55323531
How else can you be sure it's a socket? And you need the freedom to call it something else.
>>
Socket opsAss = new Socket();
>>
>>55324904
I think you're a bit lost here.
>>
What's a socket?
>>
>>55323531
Do you even public static void?
>>
Why is dependency injection good while `new` is bad? I feel like you guys are messing with me.
>>
>>55324952
You're right. I drank about six litres of beer tonight.
>>
>>55324952
I can't believe someone really solves captcha just to say basically nothing worth anyone's time.
>>
>>55324900
So why not use Python?
>>
>>55323758
Of course you do. Otherwise the program wouldn't run. Are you a pajeet or something?
>>
File: 1419407097006.jpg (44KB, 582x425px) Image search: [Google]
1419407097006.jpg
44KB, 582x425px
>>55324842
>programmers NEVER use new!
>except for virtually everyone writing frameworks and libraries that wrap constructors within dependency injections

It's not even what dependency injection is for.
>>
int soc = socket(AF_UNIX, SOCK_STREAM, 0)

no allocation/de-allocation, just a fucking integer

OOP was a mistake
>>
>>55325094
You're either retarded or never used guice.
>>
https://github.com/google/guice/search?utf8=&q=new
>>
>>55325635
>99% of them art test files

Yup, you're retarded
>>
Why is it when I rewrote my old code with OOP, it turned out way cleaner and easier to use?
>>
>>55324930
winrar
>>
>>55325667
Stroke?
>>
>>55325667
because you rewrote your code

not because you rewrote your code using OOP
>>
>>55323930
It won't help you.
If it's not runtime, runtime casting will cause a runtime error.
>>
>>55326292
Imagining writing code without objects gives me a headache.

>instead of passing an object into a function, pass an array containing the same values
>no type hinting, so have to either memorize or write down the index of each value
>or I can copy the value to an initialized value in the function
>but then what if I want to replace an array of values... I'd need a 2 dimensional array
>instead of objectname.value I'd have objectname[index] all over the place
>God help me if I decide I want to add or remove values in the array

God, it just hurts.
>>
>>55326801
>>instead of passing an object into a function, pass an array containing the same values
you mean a struct, right?

You don't fucking index an array of varying types lmao

..unless that is something java lets you do, which is retarded
>>
>>55323531
Java syntax doesnt require you to name your socket socket.
Also you forgot to close your statement with a semicolon.
Looks like the 30 minutes you spent learning java on codecademy were a total waste of time after all.
>>
>>55326918
Struct = class with only public variables. It's part of OOP.

You can have an array of varying types in many other languages, like python.
>>
>>55323531
>He doesn't know what he typed

You could rewrite it like so
Socket sock = new Socket()

Now you've written it only twice.

Object sockonfeet = new Socket()

Now youve written it only once.

Learn how to code fag
>>
>>55326498
pfft, yeah right. I can cast a non-runtime to runtime. Want to see an example?
>>
>>55327014
A struct is not OOP, retard.
>>
>>55327125
Yes it is.
Thread posts: 60
Thread images: 4


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.