r/ProgrammerHumor • • Apr 06 '22

Java is hard

Post image
5.0k Upvotes

424 comments sorted by

View all comments

75

u/superquagdingo Apr 06 '22

So is it like a rule here that somebody who uses Python needs to post something about Java everyday?

74

u/TracePoland Apr 06 '22

Pythonbros calling every other programming language "hard" because apparently having braces and a few extra keywords makes a language hard is so annoying.

23

u/the_spacedoge Apr 06 '22

Pythonnoobs*

Anyone who is ACTUALLY good with python understands programming in general well enough that they wouldn't be intimidated by other languages, especially high level ones like java lol.

-5

u/Equivalent_Yak_95 Apr 06 '22

First: I would note that for math applications, Java is among the WORST options.

Second: I’m not intimidated by it, I’m annoyed by it.

You have to make a class and given it a public static void main(String[]) function JUST TO PRINT “hello world”!

You know what that is in Python? One line. print(“Hello world”) - then you just RUN it.

You know what it is in C or C++? Two lines if you want, 4 lines with nice formatting. Either way, an include (<stdio.h>, or <iostream> for C++) and either int main() or int main(int argc, char** argv), then the body does the output operation. Then, you compile it and link it, which can be done in a single command, then run the executable.

In Java… we (me and my group for a project in our OOP class) couldn’t get the dang thing to output a runnable file. Oh, our IDE(s) would run it, no problem, but it refused to give us an output file that could be run NORMALLY.

And generics use type eraser, so - at least in my experience - they’re far less flexible than C++ templates (even when you limit it to types).

2

u/superquagdingo Apr 06 '22

Your example doesn’t really matter though because nobody is serving up hello world in a production app and especially nobody is using C++ for their backend lmao

-2

u/Equivalent_Yak_95 Apr 06 '22

But it demonstrates the sort of extra noise needed on in Java. Let me write free-standing functions, damn you!

2

u/superquagdingo Apr 06 '22

I mean I guess but at the end of the day I’d rather maintain a Java backend than c++ or Python, and a lot of people would agree. And between Spring Boot, Lombok, IDE code generation, etc. nobody really should be writing all that extra noise themselves anyways.

-1

u/Equivalent_Yak_95 Apr 07 '22

…extra noise? You mean the stuff required to encapsulate the main function?

1

u/superquagdingo Apr 07 '22

So, you're just mad that you have to put things in a class?

→ More replies (5)