Quantcast
Channel: the blatherings of forivall » forivall
Viewing all articles
Browse latest Browse all 2

The fallacy of “scripted” vs “compiled” languages

$
0
0

Note: adapted from one of my forum posts.

The distinction between compiled and scripted languages should be killed.

My first concern is that the term scripting usually connotes that the task is small. But when entire web frameworks are written in a “scripting” language, one can no longer make that assumption.

In the same vein, people usually compare performance. But when you look at the V8 javascript engine, running what is typically called a scripting language at speeds that are comparable to C#, Java and C++, that comparison is flat out wrong. (1) (2)

Another distinction between compiled and scripted languages is that scripted languages have dynamic typing and compiled languages have static typing. If you want to make that distinction, then say dynamic and static, not compiled and scripted. A programming language is just a way of expressing a certain set of instructions.

And finally, the difference between actually compiling code and interpreting code. Is Java compiled or interpreted? It’s compiled to bytecode, but then that bytecode is interpreted by the JVM. Python (CPython) also uses its own bytecode, and there’s even Jython, which uses JVM bytecode instead of Python’s own. There exists an interpreter for C. There’s a language very similar to Python called Cython that can compile to C code. There’s even a (restricted) Python to C++ compiler.

So, don’t classify languages between compiled and interpreted languages; classify language implementations as compilers or interpreters. (3)

Footnotes:
(1) There was a project to get a similar engine running Python, but it ran into some roadblocks, none of which were Python’s problems.
(2) See also on performance: Comparison of calculating the Mandelbrot setfallacy of “It’s Faster Because It’s C” .
(3) Or JIT compilers or whatever.



Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images