Ok be honest. what's actually wrong with this language?

ok be honest. what's actually wrong with this language?

Attached: 1200px-Java_programming_language_logo.svg.png (1200x2195, 116K)

too much boilerplate code, clunky as fuck and the build system is weird

other than that it's based

The fact the everything is wraped in a class.
Just small little details like @Override that make it feel retarded.
And the Build system.

Idk why you wouldn't just use C++or Python. Python if you don't give a fuck about performance, and c++ if you need performance. I feel like Java is the unwanted bastard.

the way java turns everything into a class makes some things that should be simple fairly difficult and it doesn't let you think outside of a very narrowly defined box that often times feels badly designed.

a lot of the limitation that java imposes on you is by design and i understand why its there, it is kind of the benefit of java. code will be pretty readable and similar and people will generally use the same approaches to problems and that has its benefits especially across enterprise applications and applications where you have a lot of cross library code

but there's a reason that why indians love it. there's a reason people don't make games in java even though the single most profitable game in history was coded in it

The language is garbage but the standard library and virtual machine are both top class.

owned by oracle
slower than native code, needs a bloated runtime
many overly complicated things are exposed that the average developer would never touch
gui builders for it all suck

but still better than c++

Slow as fuck.
Buggy. Exceptions.
Diferent java versions with poor backwards comptaibility.
Indians want money.
Java is popular and widespread.

This is partially true, but Java shines when you need to actually run something in a practical setting

i don lyke de syntacks, it mak me sad

C# is better and so is python

nothing is wrong with the language, it's just the way that you are expected to write it has evolved into the most retarded spectacle of enterprise horseshit i've ever seen. everything is an interface to a factory for a factory interface for a factory that builds fucking factories.

sir, i must advice you right now that JAVA is one of the most widely used programming language on the planet. very many enterprise around the world use it, therefore how can anything be wrong? please kindly do the needful and take my class if you are uncertain with java. you will mindblown!

Attached: 315648511.jpg (208x243, 5K)

python will overtake it

you can compile it to machine code despite what all the autists think. java is love

It doesn't have unsigned integers

No longer free

I think @Override is necessary for namespace purposes. I kinda wish you could overload inherited methods somehow.

java has primitives dummy

OpenJDK.

Verbose as shit for the simplest tasks.

Doesn't that miss out on the closed sourced optimizations that oracle jdk provides?

It's the same shit except free(beer) from everything I've read.
Fucking IBM says to use it and has their own branch.

No longer free() indeed

Oracle's JVM may not be the best anyway.

Attached: Oracle-30K-OPS-Cassandra.jpg (1578x921, 97K)

All of this
>owned by oracle
AKA a law firm that sells software
All of this

It's a trash language only redeemeed by 3rd party support and the stupid amount of money enterprise parties throw at making it viable.

it doesn't have value types user. every single object is a dynamic allocation and must be garbage collected.

Primitives don't exist
System.gc() doesn't exist
It isn't more performant than any other non native language

Too much caffeine

TypeScript destroyed it so badly!

Not that user but most runtimes ignore System.gc() calls (and for good reason ; the GC has a better idea of the actual native memory layout than you can have from withing the JVM itself)

> build system is weird
Maven (any other build system in Java is irrelevant anyway) is weird af at first, but soon you realize that a build system:
- should be declarative (to avoid 5kLoC build scripts that become projects of their own)
- deps strictly versionned in all cases
- deps gpg signed (fuck you npm)

But if only it didn't use fucking XML I'd be happier too...

In general:
- No proper value types (yet, they're working on it)
- No reified generics, so no T.class, so you often need to take a Class parameter in your methods
- No records/data classes so you need boilerplate code generation libs (Lombok, Immutables...)

Other than that, it's hard to find much to complain about ; the standard library is very well written in general, and provides most of what you'll need, and thirdparty/ecosystem support is probably the best of any language?

it doesn't have the COMEFROM statement like INTERCAL. COMEFROM is clearly the best way to do parallelism.

unironically this

Java isn't so bad because of openjdk but javascript is a nightmare.

I think a lot of zoomers conflate the two.

Wouldn't say garbage, but definitely a bit dated.

Mostly as you'd expect from a language that's now almost 25 years old.

Lambdas helped a lot on that front and they're looking at improving it ; we should soon(tm) get:
- multiline string blocks (in incubation atm)
- expression switches
- pattern matching
- data classes
- value types

And probably from these other nice stuff like string interpolation etc.

It's getting better over time, just slowly. Which is also the reason why it didn't become a mess over the years syntax-wise like C++ did

Nothing. Only NEETs and embedded monkeys hate it.

have you heard of a struct user? it's this cool way to make custom value types. so fucking vec2 isn't a dynamic allocation.

There's a lot of ugly little bugbears. Off the top of my head
>Every class is inheritable and every method is overridable by default. The inverse should be the default and it's good practice to only extend abstract classes any way.
>Type system is pretty weak. No higher kinded generics and lack of reification means you often can't recover the type information otherwise
>Boxing for generics is inefficient and adds GC pressure. In general you have to choose between generic code and fast code.
>Final but no real const correctness
>No algebraic data types
>Overloading is extremely fragile. e.g. overloading on different generic erasures or members of the same class hierarchy
>Overloading fields and methods results in ugly syntax hacks like method references
>Inner recursion is awkward as fuck

the way it's used

>very many
Their broken is the only thing that i like about indians

>C# is better
builtin telemetry

meme buzzwords fuck off pajet

>learn java12
>get job
>code java8

Only .net core, mono is sane as fuck.

Overall Java is pretty clean with a sane syntax and simple semantics for the most part.
Most of the old warts can be phased out and sanitized: Java went from having god-awful date/time handling to first in class. Functional programming additions are very well integrated and are miles ahead of anything in C++ or Python.

Java's biggest problem is incompetent programmers and that is compounded by its popularity.
And while the JVM is a technological marvel and a superb platform for many tasks, its sluggishness makes it thoroughly impractical for a lot of purposes. Maybe GraalVM can help in that regard but I doubt it will gain much traction.

There's more valid criticism in regards to both comfort and performance. It's not as bad as many people say but I hope I never have to touch it again.

>Functional programming additions are very well integrated and are miles ahead of anything in C++ or Python.
let's see you do inner recursion in java have as neatly as python

Strict OOP.
Classes for everything is retarded especially now that we know oop is really bad and considered bad practice.

>Performance problems
As with anything, depends on what you're using it for.
I will give it to you that the JVM is absolutely terrible for quick "run and shut down" programs such as CLI utilities, but for many business use cases (such as long running application servers or even some desktop applications), the JVM can be insanely fast (faster than Rust, right up there with C++) while still being portable.

As for comfort, I really think it's a non-issue. It's boring, OK, but all the restrictions really lower the mental load of reading the code (and the general style is more or less the same all over the world). Also, it doesn't have to be fun, you're being paid to do it.

>OOP considered bad practice
Tell me, user, who touched your objects?
Just learn to design object-oriented programs and where to mix in other paradigms. OOP is still by far the best way to do IOC, which is a very useful architectural pattern

>let's see you do inner recursion in java have as neatly as python
Got an example? I'm not really sure what you mean by "inner recursion". But neither Python nor Java can eliminate tail calls so from my perspective both are crippled when it comes to recursion.

Recursion on an inner function. Something like this (untested)
def bfs(graph, init):
visited = set()
result = []
def rec(node):
if node in visited:
return
visited.insert(adjacent)
result.append(adjacent)
for adjacent in adjacents(graph, node):
rec(adjacent)
rec(init)
return result

>OOP is still by far the best way to do IOC, which is a very useful architectural pattern
are you crazy literally just use a lambda

Well, yes, in Java you'd need a Y-combinator for that. There's usually no real benefit to not declaring it as an external (private) function, though. I don't see it as a problem.
I love doing stuff like that in Scheme, though.

there's no official support of python for mobile

>Well, yes, in Java you'd need a Y-combinator for that.
And since Java's not lazy you'd need to hide the recursive argument behind a thunk... eugh.
The best option I've found for doing this kind of thing is to just make it its own object which is pretty ugly.

>Functional programming additions are very well integrated and are miles ahead of anything in C++
java lambdas are stolen from C++.
>Java's biggest problem is incompetent programmers and that is compounded by its popularity.
bad oop, it bring corporate thinking to machines where it absolutly does not belong.
Private/public field is an a non-sense from a technical pov, if your language is talking to you and not the machine then don't use it.
>And while the JVM is a technological marvel
It's not, it's a monstruous thing at this point and graalvm exists for a reason, noone wants to to change to the jvm because it's the worst C code you will ever read.
>Maybe GraalVM can help in that regard but I doubt it will gain much traction.
It will repalce hotspot in the near future.

>And since Java's not lazy you'd need to hide the recursive argument behind a thunk... eugh.
I guess I didn't really think this through. Sorry.

However, if you don't capture state in the closure and instead pass your aggregate arguments along or rather build them up from the bottom, it can be handled with a simple function. Something like this (using inner functions to save space here) should do the trick
def bfs(graph, init):
def rec(node, visited):
if node in visited:
return []
visited.insert(node)
result = [node]
for adjacent in adjacents(graph, node):
result.extend(rec(adjacent, visited))
return result
return rec(init, set())

Since it's all pointers you can pass result as an argument as well and have the same effect. That would also mean fewer allocations. The same thing works in Java.

>java lambdas are stolen from C++.
Not really, no. That's what triggered Java to adopt them but they did a much better job. They're much better integrated with the standard library.

In my opinion - it let's you do too much bullshit without complaining, which ends in projects which basically work, but are hilarious to maintain. It's simply not strict enough.
C# is kind if similar in terms of syntax, but it's more strict and doesn't allows you to do that much bullshit. On the other side, it's not really supported under linux. It's getting better since a year or so, but it will take another few years until it works good.

wth are you talking about C# has way more bullshit you can fuck around with

Try Clojure. It's really easy to integrate it on a Java project. Functional features on Java are little more than syntactic sugar with a few optimizations on top.

For very simple IOC, sure. But then there is the problem that the "interface" is actually just the signature of a single function (per argument), which is OK for the creator of the higher level module, but has a few drawbacks for client code:
- Not independently deployable
- Harder to understand if you don't already know the library well
- How the hell do you do dependency injection in that case?
Not saying it's not doable, but it's way less clean than with regular interfaces or header modules.

The you use c++

finally some high iq post on this garbage site

byte code was a mistake.

>samefagging this hard

one of few nonretarded posts yet it has no replies because it's not bait or just oozing retardation

Attached: 1435810184401.jpg (550x404, 44K)

Java has much better performance than python and is better for system that actually need to do some heavy lifting

Java will have better performance by default unless you actually use the extra control in C++ to make things fast.

Most programmers are retards, so Java is often faster for large projects at this point.

People were forced to use it in school or have bad memories of a previous job in enterprise where the code was dreadful (not Java's fault)

.equals()

>owned by oracle
and Kotlin owned by Google, whom will soon retool Android Studio SDK away from Java and to Kotlin, and the Play App store to be fully Kotlin friendly,
...is just so much more noble.

.Seriously.

Attached: 1557576966467.jpg (610x593, 55K)

I wish there was an alternative to android shit desu

Quality post

I haven't touched Java since 2017. Am I fucked for jobs now?