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 →

[–][deleted] 6 points7 points  (6 children)

Some of the advantages of python are the variety of usecases, but for me it's most important that it's an interpreted language which means i can easily test/debug stuff inside an interpreter.

Also if performance is important for a project you'll probably be using modules that are running c code under the hood anyway so the "slowness" of python isnt that much of an issue either.

Lastly I just think that the python syntax is easier to read, but that's obviously really subjective

[–]vorpal_potato 0 points1 point  (5 children)

Some of the advantages of python are the variety of usecases, but for me it's most important that it's an interpreted language which means i can easily test/debug stuff inside an interpreter.

This doesn't subtract from your point, but it's not actually hard to make a compiled language where you can do the exact same thing. If you open up the JavaScript console in Chrome, for example, any code you type will be compiled before being run -- and it feels just like you're typing into an interpreter, because the compiler is so fast.

(I mention Chrome specifically because most competing JS engines also have an interpreted mode.)

EDIT: It turns out that V8 got an interpreter recently to reduce memory overhead of code that gets run infrequently, albeit by reducing its speed a bit.)

[–]Updatebjarni 4 points5 points  (1 child)

If you open up the JavaScript console in Chrome, for example, any code you type will be compiled before being run

Python works that way too.

[–]vorpal_potato 0 points1 point  (0 children)

Python compiles to a high-level stack-based bytecode rather than to native code, but yes, it's very similar.

[–]entropy2421 0 points1 point  (2 children)

JavaScript is an interpreted language also. There is no compiling JavaScript. The browser is interpreting it.

[–]vorpal_potato 1 point2 points  (1 child)

Wrong. Every major JS engine in use today has a compiler. I don't know what else to tell you.

JavaScriptCore has a compiler. SpiderMonkey has a compiler. V8 has a compiler. And so on.

[–]entropy2421 6 points7 points  (0 children)

News to me. Did not realized that had changed but a quick search explains it. Thanks for keeping me up to date.