[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Why exactly does everyone hate Java?
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 178
Thread images: 6
File: Java_logo.png (7 KB, 259x259) Image search: [Google]
Java_logo.png
7 KB, 259x259
Why exactly does everyone hate Java?
>>
>>53940543
Because Java is shit.
>>
>>53940568
I'm not saying it's a good language, but what are the exact features that cause people to dislike it so much? Is it because the language is too verbose or is it the fact that it's the most common language amongst stupid CS grads and Pajeets?
>>
java.lang.Object
>>
They don't know how to oop and vent their stupidity on that language
>>
>>53940543
Java is okay. I've used it a bit. Jvm is a bit annoying.
>>
File: 1429028396094.jpg (108 KB, 1181x897) Image search: [Google]
1429028396094.jpg
108 KB, 1181x897
Use Java for services and other back-ends. Works well. God intended Java for server side computing.
>>
Somewhere along the line someone got the bright idea that to make programming 'accessible' to the masses, the best language to start people in is Python.

This causes problems, because once students need to graduate to a fully fleshed out programming language with static typing and object oriented design patterns in mind, they tend to struggle.

Some struggle and progress, others struggle and just stay stagnant, declaring that "Java sucks" because they had difficulty with the OOP after the freedom of Python.

It's kind of the litmus test of whether someone is a serious programmer, or just likes to shit post on technology forums.

In any case, I think you'll find that Java is widely used, and widely respected in actual practice: There are certainly some tasks where Java isn't the ideal choice (rapid prototyping and sandboxing comes to mind), but it's used pretty much everywhere else (academia, finance, server, web) commonly, though less frequently on the desktop.

Java, and the JVM in particular, is actually brilliant, which is why it's seriously going to be around for a century, if not more.
>>
>>53940543
everything is an object - retarded
VM - retarded
design decisions - retarded

C# is a better java, but still trash since it uses a VM as well
>>
They don't even know why they hate it because they are idiots. Like this clown >>53941919
>>
>>53941919
Yeah, try to run your retarded OS dependent software with a VM
>>
>>53941919
What do you suggest to have instead of the JVM and why?
>>
>>53942043
*without
>>
>>53942047
he doesn't understand how it works, making him less than a fucking pajeet

pathetic /g/

java is pretty good btw
>>
>>53942082
I like to imagine that /g/ isn't as bad as the shitty people who make shitty threads. I was hoping he'd have a point to his claims that he wasn't illustrating, but it's possible I was wrong.
>>
In the old days Java had lots of security holes, it was really slow, and did a lot of stupid things.
Nowdays its not so bad, but the entire idea of Java is based on a "team" unit, meaning it super simplifies things to the point that more advanced things become a lot more difficult because they don't want you messing with things that might make a code monkey's head explode.
>>
slow, verbose, uses too much memory on disk and in RAM
>>
>>53942374
>slow
no it's not

>verbose
only when you're using shitty frameworks

>memory
literally who cares
>>
why the fuck do people want to get fucked by a jvm that forces you to think the way it does instead of using c++ for all their oop needs also not being limited by os/architecture
>>
/g/ thinks that by writing fizzbuzz in C, they are embedded programmers and languages like java used by dumbass software developers are beneath them.
>>
>>53942409
not him but those are valid issues, but the only time it matters people don't even think of using Java so its not like it matters.
>>
>>53942409
who cares are you fucking kidding me
>java
no memory control at all
shitey hardware access api so your stuck with a even shitier openGL api.
Code wastes resources to run at fucking run time after being compiled.
So yea I would use c++ over shity java
>>
>>53940543
Bloated standard library that takes months to learn fully, for a fast learner
Strict OO leads to overly complicated designs
Has memory and processing overhead due to running bytecode in a VM rather than native code
JVM is full of security holes
Claims to be be "write once, run anywhere" but porting to different systems sometimes still causes problems
>>
>>53942511
You can't even spell, that's how irrelevant your opinion is. Java isn't a low level language, it's not intended for that either, it has a completely different fucking purpose from C++.
>>
>>53940543
>C++
int main(){
std::cout<<"Hello World\n";
}


>Java
try{try{try{try{try{try{
class Greeting {
void greet(Named target) {
try{
System.out.println("Hello, " + target.getName() + "!");
}
catch(exception e){}
}
}


interface Named {
String getName();
}


class World implements Named {
String getName() {
try{
return "World";
}
catch(exception e){}
}
}


class Main {
public static void main( String[] args ) {
try{
Greeting greeting = new Greeting();
}
catch(exception e){}
try{
greeting.greet(new World());
}
catch(exception e){}
}
}

}}}}}}
>>
>>53942580
https://en.wikibooks.org/wiki/Java_Programming/History
>Java was to create a language that could tackle most of the things that C++ offered while getting rid of some of the more tedious tasks that came with the earlier languages.

fucking dumb ass
>>
>>53942557
>>53942557

>Strict OO leads to overly complicated designs

also this, so much. for some reason every shitter who picks up java thinks that he's part of the gang of four.

the code ends up full of abstract interface factories and adapters behind adapters behind implementations of concrete services, it pisses me the fuck off. you really don't need all those layers of indirection and paying the cost of OOP is not always worth it in places like android.

also reflection and classloader bugs, holy shit.

also fat binaries that don't get trimmed by a linker like C/C++, you need to use buggy 20-year-old proguard
>>
>>53942627
And none of those things included memory control or hardware access you mongoloid.
If you weren't a dyslexic fuck you might've actually understood that C++ was being used for simple fucking things that in no way required it's power or low level features.
>>
>>53942589
Very funny.
 public static void main(args) {
System.out.println("Hello World");
}
>>
>>53942627
Which it accomplished.
For the vast majority of tasks, Java can be used with comparable or better results than C++ with drastically reduced development time.
>>
>>53942677
>not declaring a main class

epic fail dude.
>>
>>53942683
And in a less messy way too
>>
>>53942683
>For the vast majority of tasks, Java can be used with comparable or better results than C++ with drastically reduced development time.

how can you be so retarded with all the workarounds I have to come up with in java.
its faster and easier to use C++.
also you will never get better results on java
>>
>>53942713
And yet >>53942589 declared main as returning an int
>>
The higher level a language is, the more education it takes to actually understand it.

And it takes even more education (and experience) to understand why each design decision was made.

Everything is there for a reason.

The more I learn about C, the more I can appreciate Java.
>>
>>53942726
>with all the workarounds I have to come up with in java.
Like what?

>its faster and easier to use C++.
Only with a ton of added third-party libraries.
>>
>>53942726
Because you're not a real programmer and you've never worked on a real life project.
>>
Only thing good about it is that it's cross-platform, which means it's slower overall, which is one of the bad things, the fact that it's fucked uo verbose is the other of the two biggest downsides.
>>
>>53942786
kek using a language that limits what you can do makes you a real programmer.

>>53942766
>Like what
Casting.
>Only with a ton of added third-party libraries.
doesnt take much and your still using said third-party libraries just in a repackaged form with even more bloat on top
>>
>>53940543
>Why exactly does everyone hate Java?
Verboseness. Every extra letter I write is too much.
These are two simple echo servers implemented in C# and Java.

//java
ServerSocket server = new ServerSocket(21);
while(true)
{
Socket socket = server.accept();

BufferedWriter out = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream()));
BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream()));

String s = in.readLine();
out.write(s);
out.nextLine();
out.close();
in.close();
socket.close();
}

//C#
var server = new TcpListener(21);
while(true)
{
var socket = server.AcceptSocket();

var out = new StreamReader(socket.GetStream());
var in = new StreamWriter(socket.GetStream());

var s = in.ReadLine();
out.writeLine(s);
out.Dispose();
in.Dispose();

socket.close();
}
>>
File: 1445986296064.png (84 KB, 4000x4000) Image search: [Google]
1445986296064.png
84 KB, 4000x4000
some say it is bloated and runs slow. i converted a set of perl scripts earlier into a bunch of java classes. it runs slower in java than in perl, but the code is actually reusable now due to objects. also ~25 perl files have been replaced with 1 .jar file which is awesome.

i prefer C# as a language due to all of the features built into .NET and the data structures C# has that java doesn't.

but outside of work i am 100% linux, so java wins since that is what i use.

intellij ide is the fucking shit. also visual studio is amazing, and i hate writing code now that i can't just mouse over stuff and change things on the fly as a way to debug while the code is executing.

>pic related is this whole thread
>>
>complaining about verbosity
why? in what context even?
>>
>>53942031
off yourself to reddit
>>53942047
Don't use a VM child, you have languages like Rust, Swift, and C++14/17 working fine without it and which are more portable :)
>>
>>53942631
>>53942557
that's fundamentally untrue.
Java isn't shit because it's strict OO because 1) it's not strict OO and 2) that's not a problem anyway, Java is shit because it's Java.

Ruby is strict OO and it's hardly verbose and doesn't lend itself to factory factory beans.
>>
>>53942896
>intellij ide is the fucking shit
Project Rider is a C# IDE made by JetBrains, the same people that make IntelliJ.
It's in early alpha right now, but you can download it.
>>
>>53942962
i use it for java since it's free. i use visual studio with resharper for C#.
>>
>>53941919
>everything is an object - retarded
Java has primitives, retard
>>
>>53942980
I use IntelliJ for all of my development, so it was kinda annoying have to keep VS installed just for C#.
I'll be removing VS and never looking back once Rider is fully complete.
>>
>>53940543
I haven't tried the latests versions so I don't know if this has changed. But I tried it like 4 years ago a little bit and I hated this:]

- generics are far way better in C# than in java
- no native support for delegates/lambdas like in C#
- add typed exceptions to method signature. This is fucking hell. I know there was another option with some runtime exception or some shit, but the mere existence of adding the exception to the signature is shit.

I don't remember anything else now.
Also, although it is not strictly related to the language, Visual Studio >>>> Eclipse
>>
>>53943045
cool, i really like vs and i'd use it for everything if i could

i use it at work every day and i'm just so used to it
>>
>>53942043
There's no reason why software should have to be OS dependent in the first place.

>>53942589
>C++
#include <iostream>
int main () {
std::cout << "Hello World\n";
}


>Java
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
>>
>>53943033
Yeah, but Java IS the language where you have to declare your main program as a class, even if it is just Hello World.
>>
>>53943166
who fucking cares? We don't live of programming hello worlds
>>
>>53942736
return 0; is automatically added if you leave it out.
>>
>>53940543
I actually think that the object-based nature of java and interfaces and all that are pretty neat, it's just that when you get down to actually programming something you have to deal with the sheer ugliness of the language.
Examples
>3 or 4 different "array" types that are all used by the standard library, forcing you to insert random conversions into your code
>static classes
>primitives in a PURE OOP LANGUAGE
>primitives not being acceptable generic types (and not even because of technical limitations)
>functions that return values and functions that return void have different types (but not different enough that you can use overloading to make a method accept them both)
>no keyword arguments
>division does not automatically result in a float/double

It's a shame, because like I said the whole pure OOP is very interesting, and despite its faults java scales like a motherfucker, and is brainless to write.
>>
>>53943240
Most programs in other OOP languages don't store the main() function inside a class.
>>
File: the face of developers.jpg (145 KB, 1280x960) Image search: [Google]
the face of developers.jpg
145 KB, 1280x960
Because it creates people like this
>>
>>53944516
>everyone is indian
>>
>>53944526
Are you blind? Not a single person in that pic is Indian. Pic is from some South American country.
>>
>>53944803
They don't look latinos.
>>
>>53944835
latino here. they look latinos.
>>
>>53944893
Pretty sure my mexican gardener doesn't look like them.
>>
>>53940543
> Pajeet Language
> Not native
> Shit
>>
You can create literally everything with Java and the name sounds cool. Kotlin is objectively a better language though, and is 100% interoperable with Java.

Everyone saying that Java sucks is probably just too lazy and dumb to learn it.
>>
>>53944076
>>3 or 4 different "array" types
what?
>>primitives not being acceptable generic types
autoboxing
>>functions that return values and functions that return void have different types (but not different enough that you can use overloading to make a method accept them both)
overloading based on return type was afaik never possible in java
Sometimes would be neat though.
>>
File: 1460152625715.png (1 MB, 1080x1920) Image search: [Google]
1460152625715.png
1 MB, 1080x1920
>>53944933
>>53944893
>>53944835
>>53944803
>not seeing company name
clearly all of them are japanese.
>>
>>53940543
They failed to get good. Some of the best code I've ever seen has been in Java.

It was at Google, but still.
>>
>>53940543
literally designed for tvs
>>
>>53942047
Why would you need a VM? There are several portable languages, including the frontrunner C
>>
Write once, test every minute
>>
>>53941019
>Jvm is a bit annoying
shut up, jvm is amazing
>>
>>53947251
>you will never be this much of a cuck
>>
>>53942896
>java slower than perl
what the fuck are you smoking? perl is usually even slower than python
>>
>>53944434
C# does that too. Try again.
>>
Because it isn't as hard as things like C++ and still gives you a good end product. It is kind of like VB in that it makes programming more accessible to those without a deep understanding of the hardware.

Really Java is fine for what it is designed to be used for. It isn't a systems programming language. It is a application programming language suited for servers, back end, desktop apps etc.
>>
A calculator in java? That'd 10gb of ram + tip
>>
>>53942873
Java is an IDE language and any good IDE will make writing all of that mostly automatic. With IntelliJ I actually type less than I do with C in a standard editor.
>>
Because you look a a l33t cool mlg if you hate java.
>>
>Java
lmao
>>
>>53940543
>It's slower than C++.
>It doesn't support inline-asm (it's important in some cases. Even when you have to write for more processor architectures and every OS where your program should run)
>No Low-level
>Requires the user to install Java
>no advantage against Python with C extensions.

#include <stdio.h>
int main()
{
printf("hello world\n");
return 0;
}


C++
#include <stdio.h>
int main() {
std::cout << "Hello world" << std::endl;
return 0;
}


Java
public class HelloWorld 
{

public static void main (String[] args)
{
System.out.println("Hello World!");
}
}
>>
It's too verbose.
>>
>>53942589
So beautiful anon
>>
ITT: basement dwellers who have never written anything more complex than fizzbuzz and judge verbosity of a language by Hello World programs
>>
>>53948576
ITT: pajeets
>>
>>53941753
This.

Java is godly.

The only thing that comes close to having the power and libraries is Python.

I wouldn't even touch c#

c++ should never have been made.


Sometimes Java frameworks can be ridiculously complex, but that's because you're probably trying to use something meant for fuck off big enterprise systems, not a small project.
>>
>null pointer exception
>>
>>53940543
Because it's a meme.

Java is fine, and anyone who says otherwise has probably never programmed before in any language.
>>
>>53940543
>BAWWWW why did they make space shuttles so hard to use? i need to press like a hundred buttons just to take off, and the thing flies like a brick.
>>
>>53940543
Because not everything is a fucking object.

Also why the fuck does

for (;;) {...}

compile in java but

if () {...}

does not?
>>
>>53940543
I love it, great drink to wake up with.
>>
>>53940543
neets be jelly of my paycheck
>>
>>53943069
Don't you see a problem in getting buried in Microsoft's eco system?
>>
>>53948853

You get to a point in development where your success is more reliant on your management skills than your programming skills.

Java is not geared for lower end development.
>>
>>53940884
>java.lang.Object
Object allowed me to implement so many working hacks, I lost their count. That and reflection.
Generally frowned upon, but sometimes you just want higher level functions missing from .. say.. the bytecode 1.4 you are obligated to work with.
>>
>>53948789
C# is objectively better than Java though.
>properties
>proper events and delegates (function pointers)
>unsigned integer types
>value types/structs
etc.

also has the better IDE, imo.
>>
>>53949057
The idea I have from Microsoft is that either you pay them a lot of money eventually, or they're going to pull shady shit one way or the other.
>>
>>53949112
Well, they did open source pretty much everything C#-related (under the MIT license even). The framework libraries, the runtime, they even bought Xamarin (A company that made the Android and iOS frameworks for C#) and made their shit free.
I think they're really trying hard to win back developers for their platforms.
>>
>>53949139
They sure are.. The language is still patented however, the fsf has some concerns. http://www.fsf.org/news/2009-07-mscp-mono
>>
>>53940543
Anemic syntax really, and shitty GC. I simply can't understand how someone could fuck up syntax so bad. Anonymous classes a pretty cool though. The rest is very basic or not/under-implemented, the best example is Java's genetics, they are fucking useless.
>>
>>53949159
Eh, first of all, C# itself is not patented. The base language is an ECMA/ISO standard that can be implemented by anyone. However, there were some proprietary language extensions and parts of the base class library were not part of the standard.
Second, that article is from 2009, back when mono just started to be a relevant alternative to .NET. I don't think it is still up-to-date.
Third, I think they made a new patent promise when they open-sourced C#. I also find it highly unlikely that they will ever sue anyone for using or implementing C#. That would make no sense at all and would achieve the opposite of what they are trying to do here.

I believe Microsoft is genuinely trying to make C# and open standard so it gets adopted by a larger community.
>>
>>53949215
>the best example is Java's genetics, they are fucking useless.
how so?
>>
>>53940543
It has nothing similar to "using" construct from C# so everything real-time WILL stutter, even with buttloads of RAM. It's not suitable for responsive application and not even a hundredth as convenient as most scripting languages, what the fuck is its niche? It's used where it should not be, and it sucks.
>>
>>53949256
You can't create an object of T, to return it for example.
>>
>>53947384
He is probably running all 25 at once in Java compared to one in perl
>>
>>53949260
How the fuck does "using" help avoid stutter in real-time? It's only useful for a handful of things, mostly IO stuff. And the point isn't making things stutter less, but having files/streams/memory only locked/busy for a small time window when you're actually using it, not until it gets garbage collected.
>>
>>53949312
It's useful when you rapidly create objects.
>>
>>53940543
I don't.
>>
>>53949159
Their license includes patent grants.
>>
>>53949272
you can, using reflection, but it requires passing an additional object
>>
>>53949326
I can't think of a scenario where one would do that. I mean theoretically it would probably work, but when do you ever create huge amounts of objects that you only use in one "using"-block? You really have to create tens of thousands of objects for the GC to take a considerable amount of time collecting them, plus the GC runs asynchronously in its own thread anyway.
Having a pool of objects and reusing them would probably be a much better solution for both Java and C#.
>>
>>53949360
>but
There you go

Also
>reflection
Useful, but having to resort to it means the language is still lacking in that department
>>
>>53947251
TCO when?
>>
>>53949312
You know when something will be deallocated.
>>
>>53942631
This, especially the android part.

At work we use an embedded android system running on beagle bone black, the system has plenty of resources if you don't write code like an OOP code monkey and use your brain, make tradeoffs where you need to and don't blindly follow design patterns because it's 'best practice'.

Overly abstracted code can be really elegant at the cost of performance, maintanability etc, but there's also a time and a place to use it, certain problems lend themselves well to different levels of abstraction.

We frequently have discussions about this when it comes to refactoring things and it inevitably turns into a gold plating excercise leading to 3 weeks of bug hunting because you overlooked something subtle in the SDK.
>>
>>53949413
Are you sure that the object's memory is really freed? If it is, that's an implementation detail and not guaranteed to happen. The purpose of the "using" statement is to ensure that the Dispose() method on an object implementing the IDisposable interface is called, no matter what happens (i.e. a return statement in the middle of the using block, or an exception etc). As far as I know it does not force garbage collection of the object instance itself.
There is a GC.Collect() method, however.
>>
>>53949249
I don't know, attacking parts of the free software community would fall in line with suing TomTom for using Linux's VFAT implementation. Their intentions towards non-Windows platforms seem pretty bad, and that does make the patents a slippery slope.

This would still mostly come down to not trusting Microsoft as a whole. We'll see.
>>
>>53949508
To be fair, those things happened years ago. Microsoft's leadership and the market as a whole has changed a lot since then. I mean, they are literally implementing Linux in Windows now. Something no one would have imagined a few years ago.
>>
>>53940543
People say it's slow as shit but I've seen examples where it competes with C or C++, sometimes even outperforming it, so I really don't know if java is still slower.
Then again, it is a memory managed language so I assume the GC still gives you a performance hit.
>>
>>53949549
>Microsoft's leadership and the market as a whole has changed a lot since then.
I'll wait until their legal teams stop fleecing large companies using Linux with threats of patent litigation.
>>
>>53944434
What does that even change?
>>
>>53949549
Microsoft wants to attract developers to Windows, the FSF wants people to use free software. Microsoft implementing a Linux subsystem isn't going to help the latter one, quite the opposite even.

In Microsoft view it's the developers that get to build their ecosystem, they attract devs trough supplying convenience, the consumers suffer through being data-milked and advertised on, and Microsoft gets rich.

And no, no sane person that cares about free software consider Microsoft a "friend", not as long as they're pulling shit. https://www.fsf.org/blogs/community/dear-microsoft-fsf.org-is-not-a-gambling-site
>>
>>53949612
Somewhat off topic, but why did they even use FAT? It's not like it's a particularly good file system. Why not just use ext (or whatever) like any other sane Linux user.
>>
>>53949674
Probably to let users who use Windows use some TomTom desktop application.
>>
>>53942589
Are you an idiot? You don't need to create a "getName" unless you can't implements the same functionality in toString for some reason like having toString encode the object into JSON
>>
>>53940543
Exploitable as fuck
>>
>>53949661
Yes, I didn't say that Microsoft suddenly became free software's best friend (although I think their relationship towards openness has changed for the better, at least on the developer side). All I was originally saying is that C# is a really good language/platform and it's free and open source, anyone can fork it and make pull requests etc. Microsoft does have some patents, but they made a patent promise and it is REALLY unlikely that anyone will ever get into trouble for using C#/.NET.

>>53949711
In that case it's kind of obvious that they MAYBE should have purchased a license from Microsoft to use their invention? I mean, I hate software patents, but from a business perspective, TomTom could have guessed that they might get into trouble for this. Especially since anyone else does purchase licenses to use FAT.
>>
>>53949747
You must be an uneducated backward-cap moron.
>>
>>53944526
they all look latin american to me. probably taken in a south american office.
>>
Same reason C++ is understandably dislikable, ugly as hell standard library. I think it's a little ugly if you have to either typedef or alias to get acceptable code noise. This is where c# shines, besides starting 3 or 4 levels deep most libraries are written so simply.
>>
>>53942896
What about .NET Core? Isn't it available to all platforms?
>>
>>53949752
>but they made a patent promise and it is REALLY unlikely that anyone will ever get into trouble for using C#/.NET.
Based on the promise, yes. Based on Microsoft's history of going far out of their way to attack competitors, absolutely not. Microsoft's patents should be completely waterproof (which wouldn't be special or uncommon in software) to gain decent trust from free software developers, and they just aren't.
>>
>>53946598
>what?
arrays, arraylists, linked lists, and other shit that isnt generally used
>autoboxing
shitty workaround that doesnt help in many cases
>>
>for backend and dev work
It's pretty nice, but not my favourite language.
>for the average internet user who are forced to install the runtimes
Always whining about updates, full of security holes, barely works for the applications it is trying to run, etc.

Personally I hate it for the latter.
>>
>>53950218
>arrays, arraylists, linked lists, and other shit that isnt generally used
do you even have some basic understanding of data structures?
>>
>>53950315
I understand their differences, Its just that they are all used in the standard library randomly for no reason, and it would be best if things like variadic arguments werent stored as arrays
>>
>>53950362
>Its just that they are all used in the standard library randomly for no reason
I think it's mostly about picking right data structure for the job or some legacy code using stuff like vector. could you give some examples?
>>
>>53944076
>division does not automatically result in a float/double
wtf, that's a good thing. What sane language would do that?
C/C++ don't do that either.
>>
>>53942589
>I write crappy code in Java, so it must be shit
>>
>>53951450
It is shit though
>>
>>53951468
I'm not going to disagree. But that argument was retarded.
>>
>>53940543
i really dislike OO in general. Too much shit going on
>>
>>53951527
Yeah I agree
>>
Just because a language allows you to write shit doesn't mean you have to write shit. If you don't like Java, that's fine, but it's perfectly capable for most tasks, unless you're trying to write super low level code, in which case get the fuck out, you already knew the answer.
>>
>>53949272
>can't create an object of T,
use a parametrized factory you mongoloid
>>
>>53951630
>use a factory
Javafags everyone
>>
>>53951666
Are you fucking stupid? There's nothing wrong with creating factories. Are you just such a bad programmer that you can't bear to write a simple little factory class? Get the fuck out, kid.
>>
>>53951685
>create a class
>for a factory
Javafags everyone
>>
>>53951706
And so I bet you just cram everything into one file, dont you.
>>
>>53947805
I hate this argument so much about verbosnes.
In intelliJ you litteraly just type "psvm" and then "sout" "Hello world". That is it. 4 fucking words and I already have what you have in your java code.
>>
>>53948797
>what is Optional
>>
>>53951630
what exactly do you mean? can you post some example code? I don't think you can actually create a new instance of a generic type without using reflection on an object or a class object of that type at runtime eg. like in Collection::toArray
>>
>>53940543

People hate Java, because - let's be honest - it's an ugly language.

Java is amazing for it's purpose, but for smaller and faster stuff it's terrible verbose. Would you use an M1A1 tank to go shopping? Probably not.. People often fail to comprehend that every language has a differnt purpose and differnt surroundings. A decent programmer should have a bunch of porgramming languages up his sleeve (which languages depends on the area he's working).

Another intersting point is, that if you look at Java 8, they've stolen.. ..uhm, they were inspired by a lot of concepts of "younger" languages:

List<String> myList =
Arrays.asList("a1", "a2", "b1", "c2", "c1");

myList
.stream()
.filter(s -> s.startsWith("c"))
.map(String::toUpperCase)
.sorted()
.forEach(System.out::println);


Yes, it's Java!

Also:
>Groovy is the better java
>>
How long would it take a programming newbie to learn the following Java concepts (assuming they were a NEET):

>Java overview and the basic language elements: Introduction to Java. Elements of Java programming. Review of programming constructs of the C family languages (Language structure, conventions. Variable and data types. Arrays. Operators. Expressions. For, if, while, do). Main method.
>Objects in Java: Objects, Classes, Packages, Generics, Inheritance, Interfaces.
>Classes/packages.
>String classes, System classes, Collections.
>Error handling: Exceptions (unchecked exceptions, throw)
>>
>>53951851

1 month, 3 days, 14 hours and 47 minutes.
>>
>>53951845
Anon please most people here think that Java is still stuck on Java 1.5. No Steam API, no Collections API, no Optional or monads no nothing. In their mind it is still stuck in the 90ies.
>>
>>53951923
>Steam
Javafags everyone
>>
>>53942873
who uses raw blocking sockets in the current year?
>>
>>53942749
>The higher level a language is, the more education it takes to actually understand it.
What? High level = closer to natural human language
Low level = closer to "Metal"
>>
>>53940543
Java the language is very good
Java the vm is very good
Java the browser plugin is shit

I think that's why many hate Java, they think it's just the plugin.
>>
>>53951851
applets are already removed from java though. what was so wrong about them anyway? I remember coming across a lot of them 10-20 years ago and they seemed ok. how are they worse than eg. adobe flash?
>>
>>53952098
wrong quote. I meant:>>53952098
>>
>>53952018

This.

Also Java isn't that much of a "high" language.
Other languages do a lot more magic in the background.
>>
>>53949804
No they aren't.
>>
>>53940543
Actually, /g/ hates everything, they never do something that matters with a computer
>>
>>53941890
1) What kind of projects would you do in Java that cant be done in Python? Disregarding obvious shit like lack of (I think) python interpreter on android etc..
2) Why would you prefer them in Java instead of Python? inb4 static typing, anything that can ever come out of that should be covered in your tests
>>
>>53952787
You can make android apps now completely in Python, especially if you build on CPython since C is portable
>>
>>53951685
Its having to use them that's the problem. Java isn't enjoyable for anyone that's involved.
>>
>>53940543
Honestly the thing I hate most is the legacy code. There are so many things wrong with it purely because of muh backwards compatibility, like all the stupid methods provided by default on Object without actually having a sane implementation instead of being an interface that needs to be implemented for the subclass itself. Also the most common frameworks like spring are such fucking huge blackboxes, requiring a fuckton of magic annotations with magic values and it'll automagically do shit for you you probably don't want it to do, like automatic type conversion.
>>
Haters complain about "features" which have nothing at all to do with the quality of programs that people can make with the language.

Like this nonsense here:
>Monads are central to Functional programming. They are generally totally ignored in imperative programming. They are even often feared by imperative programmers. Most Java programmers either do not know what a monad is, or would raise strong protest if monads were to be introduced in Java.
https://dzone.com/articles/whats-wrong-java-8-part-iv

First of all, that's just plain wrong. Most functional languages don't have any kind of support for monads in the language. It's a Haskell thing that spread to other languages in the past 5 or so years.

Second of all, that's no reason to add a feature to a language. Why should monads be shoved into a programming language that gets along fine without them? Is there any study anywhere in the world that says monads improve the quality of programming languages?

Academics are trying to replace monads in the new generation of functional languages (like Eff) while know-it-alls are turning Java into a dumping ground for failed ideas that are on their way out. That's reason enough to "fear" them.
>>
File: 1458637627905.gif (360 KB, 490x750) Image search: [Google]
1458637627905.gif
360 KB, 490x750
>>53942589
>int, yet returns with nothing
Great job mad pajeet
>>
>>53954806
absolute idiot, main returns 0 by default, even without it
>>
The language is alright. A bit verbose, but simple and nothing fancy.

Now what I dislike is the ecosystem, every library is some FrameworkFactoryFactory clusterfuck.
>>
>>53942589
faggot and low iq
>>
>>53954806
void main() isn't valid C++, and return 0 is assumed if there is no return statement.
>>
>>53954806
void main() isn't valid C++, and return 0 is assumed if there is no return statement
>>
>>53954806
void main() isn't valid C++, and return 0 is assumed if there is no return statement.
>>
>>53947805
>It's slower than C++.
like pretty much every other language.

>It doesn't support inline-asm
>No Low-level
guess what is its use case

>Requires the user to install Java
...to get the same executable run everywhere

Java is a shitty language, but your point of view make no sense.
>>
>>53954806
Someone doesn't know C++
Thread replies: 178
Thread images: 6

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

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.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.