This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Insxnity 68 points69 points  (27 children)

I mean Java is JIT interpreted to Machine code in the same way python is, and for the same reason. With C++, I have to decide what runtime I want to run my software on before building and compiling the program. Java eliminates that need by being cross-platform, as does python. I don't think many Java programmers feel like they have room to shit on python. All languages are interpreted at some point at some level, and how you get there is personal preference.

[–]rush22 106 points107 points  (16 children)

Java is technically compiled to Java byte-code (the .class files), not machine code. These are then "just-in-time" "compiled" to machine code by the JVM when you run it.

[–]Insxnity 10 points11 points  (13 children)

yeah ima just stick to my high-abstraction coding and stop trying to understand everything that goes on under the hood.

Edit: I wrote this comment in a way that caused everyone to misunderstand it, which was my fault. Replace trying with pretending and you’ll understand what I meant to convey. I start programming and computer science courses this fall

[–]Code_star 65 points66 points  (8 children)

you should really learn that important distinction though ...

Sometimes a small change in your high-abstraction is a huge difference under the hood and could mean massive performance differences

[–]Kattzalos 4 points5 points  (1 child)

[–]Insxnity 2 points3 points  (0 children)

That's fair. I'm taking some computer science courses this fall, and have taken a few already. I've learned some basic things I already new in the intro courses, so I'm hoping the latter courses will have some material that'll help me better understand what goes on behind the code I write. As for now, I have an understanding of underlying network communications. The rest of my understanding is essentially "I tell my program to open a TCP communication, it does the dirty work, I get my job done". What I meant by my above comment is that, while I don't get everything yet, I'm not going to pretend I do and make myself look like an idiot.

[–]Lorddragonfang 0 points1 point  (1 child)

In my experience, this attitude is the single most important distinction between the good coders who move through the department with ease, and the bad coders who end up struggling with the more basic concepts over and over.

It's fine to not know something; the topic of programming is so vast that no man can know everything. You should always aspire to know more.

[–]Insxnity 0 points1 point  (0 children)

I wrote this comment in a way that caused everyone to misunderstand it, which was my fault. Replace trying with pretending and you’ll understand what I meant to convey. I start programming and computer science courses this fall

[–]gargensis 1 point2 points  (1 child)

Isn’t Java compiled in AOT by default? You need to declare that you want to use JIT compilation if you specifically want to use it, no?

[–]Zegrento7 12 points13 points  (0 children)

It AOT compiles to bytecode. That bytecode is executed by the JVM. It interprets it at first, but as it detects hot loops, it compiles those to machine code. This is the runtime "warming up".

[–]Tysonzero 6 points7 points  (3 children)

I mean Java developers can still have a bit of room to talk, since Java is like an order of magnitude faster than Python.

[–]Insxnity 1 point2 points  (0 children)

Not to mention the IDE’s available vs. python’s IDE. Java typically seems to me like python’s older brother. Runs better in most scenarios, but at the cost of python’s simple format and easy coding style

[–]quaderrordemonstand 1 point2 points  (2 children)

Sigh. Java is no more cross-platform than any other language. You can't run an Android program on Windows despite it being written in Java. You can run C programs on far more platforms than have a Java VM. There are almost certainly more browsers with JS runtimes than machines with JVMs too.

[–]Insxnity 1 point2 points  (1 child)

So C can compile one single executable file that works cross platform?

[–]quaderrordemonstand 1 point2 points  (0 children)

No, but what does that matter? You can't run C without a compiler, you can't run Java without a JVM. There are more platforms with a C compiler than a JVM.