"hurr durr pajeet" memes aside, what is wrong with Java

"hurr durr pajeet" memes aside, what is wrong with Java

Attached: serveimage(7).png (1200x2195, 116K)

Other urls found in this thread:

youtu.be/QM1iUe6IofM
benchmarksgame-team.pages.debian.net/benchmarksgame/faster/gcc-java.html
benchmarksgame-team.pages.debian.net/benchmarksgame/faster/c.html
cr.openjdk.java.net/~briangoetz/amber/datum.html
twitter.com/NSFWRedditImage

>A list of dogs is not a subtype of a list of animals

That's a correct behavior though. If you need a method that operates on both then just write the method generic

Void type breaks single-inheritance type system. Every type can become Void but none inherits from it, thus making the type hierarchy not a tree.

There's nothing wrong with it. It's pretty great.

Nothing.
It's popular and easy to learn so guess why pajeets who represents now 70% of every code monkey on this planet learned it

they hate us cause they aint us

Nothing that bad. It's kind of verbose meaning you'd need an IDE or at least some editor plugins with autocompletion to do any meaningful work. As well, the "noun-orientation" of the language forces you to think about problems in a certain way, which maqy not come naturally to some.
There is a lot of shitty Java code, but that is partially due to the fact that it's the most-used language in enterprises where software is written by office drones with no experience in writing good software.
It really just comes down to designing your program beforehand, either with some formal method like UML or CRC cards, or just writing down what classes you want and how they should interact.

Nothing wrong with Java in particular. However, it was the first portable OOP language, and it encouraged bad practices.

An example is code bootcamps. You can't teach it and its OOP concepts without hamfisting OOP concepts into projects that don't need it. Leading to rigid understanding of code design, where if you don't abuse inheritance, polymorphism and objects for everything, then you're 'doing OOP wrong'.

>youtu.be/QM1iUe6IofM
This guy puts it pretty well, if you can get through it all.

>OOP is dead, its very static, hard to refactor, huge boilerplate for the most minor things
>write once, run everywhere was a lie, running on a VM offers no advantages to portabillity
>slow, bloated (people dont notice because bloat is distributed across servers)
>cookie cutter standard library made for idiots trying to pretend theyre systems programmers
>the only 'good' thing about Java is things never change so everyone ends up using the same solutions for everything

>Bad type safety
>Poor error handling
>Several versions of bad APIs piled on top of each other
>Slow language evolution
>Heavily touted but really slow closure implementation that none of the libraries use

It's pretty good for an enterprise language though. Yeah you need three times the number of servers you would with C++, but it's much less of a pain in the ass when something crashes in production.

Because I like C# and I think I'll get confused if I try to learn it, stop bothering me.

And here we see the person who never actually used Java

I probably can't offer as technical an awnser but personally I find it's just one of the more..boring programming languages? At least in regards to what it's used for. Compare it to C, Haskell or even Python and how can you expect me to get excited about Java?

I have something to offer you anons...

Attached: scala-spiral.png (304x492, 78K)

Oracle

In fact, they are pretty similar, you wouldn't be confused

Java is just super verbose. Even basic shit like reading from a file - can't remember how it must look in Java.

>huuur he never seen Java before
typical brainlet response I expected

>super verbose
Files.readAllLines(Path path)

I hope you don't code like that faggot because that's definitely not all

>not using streams
pajeet detected

OverlyVerboseAbstractFactoryFactoryBean.start()

>OOP is dead
Stooped reading there

>>OOP is dead
Thanks for putting out the "stop reading this post" sign this early, appreciated.

this but unironically. Many companies will try to convert from Java to Scala, but then realize that there are so little Scala devs out there that they abandon the idea. If you can be one of those devs, you can make pretty good bucks.

>tfw did one semester on scala in uni and automatically know 60% more about it than the average "scala dev"
feels good man

what a joke
use kotlin

Attached: kotlin-chan.jpg (500x768, 82K)

>that's definitely not all
You are right that's not "all"
List shit = Files.readAllLines(Paths.get("shit.txt"));
this is the full functional code
He complained that reading files is super verbose which is not true.
>implying i actually use Java for anything relevant

Doesn't readAllLines return a steam?

verbose as fuck

That would make no sense, the point of a stream is to not read everything at once which you do if you read all lines

>>slow
It's almost as fast as C

benchmarksgame-team.pages.debian.net/benchmarksgame/faster/gcc-java.html

Easy to learn, hard to master. Makes for bad code

oh no no no no

AHAHAHAHAHAHA

Attached: Screenshot 2018-12-28 at 19.34.22.png (675x150, 26K)

Except every type in Scala devolves to Null in Scala or AnyRef.

>null
retard who doesnt know anything about scala spotted

ok so it's official, C++ users are retarded and the only time C++ is faster than C is in their one meme sorting example
benchmarksgame-team.pages.debian.net/benchmarksgame/faster/c.html

Well this method will be only able to get elements. To put them you need . Basically this is formally called type invariance and is caused by Java's backward compatibility issues

Type erasure.

Nothing wrong with this in a language with mutation, you should use type variance.

What? I thought Void was just a regular reference type. I had no idea it was a bottom type.

Files.lines does

>It's not Kotlin
Although the steady, rolling JDK updates are slowly fixing everything

I reckon that data classes will come to JDK 13 and we'll finally be rid of the POJO boilerplate
cr.openjdk.java.net/~briangoetz/amber/datum.html

*crashes*

What's wrong is that it's directly inferior in features and functionality to C#. But it does have awfully unpleasant and inconvenient crossplatform going for it.

If you're sticking to windows, or even crossplatform with Mono, use C#.

If you need crossplatform, there are better options than Java now (Javascript).

Language is sold out with commercial support only in the future
Bad abstractions
Shit syntax
Lousy support for functional features
Everything needs constructors/getters/setters, yet Java has the worst syntax for those
Exception handling is all wrong
You need a metric fuckton of "design patterns" to achieve anything because of the shortcoming of the language
Hurr, it's not an int, it's an Integer!
Hurrdurr, Mixins are bad, yet we change Interfaces so they become more like Mixins with every version
Let's add unnecessesary stuff until you can't even code without code generator

yeah the `BigInteger` class really makes my almonds crunching. Especially when there are coding challenges on Hackerrank and pajeets think they are cool by forcing you to use this retarded class.

Attached: sobbing_cat.jpg (640x603, 44K)

dinosaur language that suffers from scope creep

>I reckon that data classes will come to JDK 13 and we'll finally be rid of the POJO boilerplate
that would be so awesome.

That list is like half wrong. What a shit post.