r/ProgrammerHumor • • Apr 06 '22

Java is hard

Post image
5.0k Upvotes

424 comments sorted by

View all comments

Show parent comments

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).

1

u/fsr1967 Apr 07 '22

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

Java isn't a math language. It doesn't claim to be a math language. It's good at many things, such as serving applications and talking to databases, but math is not, and never has been, one of them.

If you need to pound nails into a wall, you don't get out your Leatherman. Yes, it can do the job, but not very well. You're much better off finding a hammer.

1

u/Equivalent_Yak_95 Apr 07 '22

NumPy is such a hammer.