re: Thoughts on interpreted vs compiled languages? VIEW POST

VIEW FULL DISCUSSION
 

It all depends on the intended purpose.

Compiled languages:

  • Are faster at runtime

  • Conceal source code

  • Have associated compile time

  • Are better when you're not making frequent changes to the code, and care a lot about runtime speed

Interpreted languages:

  • Are slower at runtime

  • Have open source code, but that code can be obfuscated (minification, uglification, etc)

  • Don't have to compile before use, but can have an initial parse time that's typically much faster than compile time

  • Are better when you are making frequent changes to the code, and don't care as much about runtime speed

There are also factors regarding whether you need additional software to be able to run the code, but languages like Java (compiled but still needs the JVM) kinda muddy the waters on this.

 

Some languages come with compilers that are fast enough to make them equally suited for frequent changes (e.g. Go). Compilers can also help you find problems early - the Elm compiler is famous for this - which can be a boon when making frequent changes.

In theory being interpreted or compiled is often not a property of the language. I've seen C interpreters and JavaScript compilers. Although I'm not sure if you can create an interpreter for declarative languages, as they do not have statements that can be 'executed' line-by-line.

When it comes to muddying the waters, I'd go so far as to say interpreted and compiled are different ends of a spectrum rather than enumerable values.

code of conduct - report abuse