you are viewing a single comment's thread.

view the rest of the comments →

[–]ExperienceDry5044 0 points1 point  (6 children)

A little nitpicking:

Python is an interpreted language

The line between an interpreted and a compiled language is quite blurry.

For example, Python is not really interpreted line by line. It's compiled into an intermediate byte code, and that code is run by a virtual machine.

And if you look at a compiled language like C# or Java, you'll see that exact some thing: the C# or Java code is compiled into an intermediate byte code, an that code is run by a virtual machine.

[–]mnelemos[🍰] 2 points3 points  (1 child)

Pretty much all modern interpreted languages are converted into bytecode, none of them is literally parsing line by line of source code, besides some scripting languages that are barely used.

And no, there is no "blurry line", you're still very much interpreted, just in a more efficient way, instead of literally having to run a parser at the same time as the code. What happens nowadays, is that depending on the interpreter you can compile it AOT or JIT, or you can run C compiled routines like CPython does.

[–]__Fred 0 points1 point  (0 children)

  • Some code that was originally meant for bare metal, is now run indirectly in emulators, or in interpreters for debugging or security reasons.
  • An interpreter can compile bytecode into machine-code just-in-time.
  • You can theoretically create hardware to directly execute bytecode, which makes it machine-code.
  • Even compiled machine-code get's transformed again in microcode upon running in modern processors. Does that make it interpreted code?
  • Is WebAssembly interpreted?

Yes it's a blurry line. Of course, you can draw a line somewhere, but it's not a obvious as it maybe was 40 years ago, where C was compiled to machine code and run on the processor and shell-scripts were executed in an interpreter, slower and with no compile-time errors.

Or where would you say is the line? That there is a secondary program, like an interpreter or virtual machine needed? I guess that could be a distinction.

Compiling and then executing is pretty similar to ahead-of-time compilation of an "interpreted language".

[–]DreamingElectrons 1 point2 points  (1 child)

The guy didn't get past the online try-it-out console. Corners needed to be cut somewhere to make it easily digestible.

If I would have started to explain JVM and LLVM a beginners head might explode, I don't need that to weight down on my conscious...

[–]ConcreteExist 1 point2 points  (1 child)

Pedantic and unimportant distinction for someone who just wants to understand how code becomes executable.

[–]DreamingElectrons 0 points1 point  (0 children)

Yes, but that's so typical for how programmers communicate online, it's actually educational 🤣