Saturday, June 16, 2007

Scripting languages vs. Compiled languages

Scripting languages:
php, perl, python, ruby

Compiled language:
C, C++

The advantage of a scripting language is concise grammar. Three lines of C++ can be done with one line of Perl. The disadvantage of a scripting language is slow execution time. In exchange for a better grammar, scripting languages sacrifice speed.

The advantage of a compiled language is speed. The disadvantage of a compiled language is clumsy grammar. In exchange for more speed, compiled languages sacrifice concise grammar.

Java does not fit into either category. It is not script, nor is it compiled. In fact, it inherits the disadvantages of both categories. Java sacrifices both speed and concise grammar. Java is slow because of the virtual machine. Java's grammar is clumsy because the grammar is based on C++.

Then why is Java successful? Java is a better C++ than C++, at least in applications that don't require much speed. For C++ programmers, Java is a boom. Often languages can be successful if the language is easy to learn.
blog comments powered by Disqus