Hi all,
In a recent post to an OCaml mailing list, someone asked why Perl performed better than OCaml in a specific text oriented task. To my surprise, in his answer, an OCaml guru defined Perl as a "domain specific language for string munging".
It is surprising how this old fashioned cliché remains alive as time goes along.
If you think about it, there are plenty of similar concepts enveloping programming languages. For example, the Perl's motto "there is more than one way to do it (TIMTOWDI©)" is a fantastic marketing phrase that, indeed, can be applied to almost any modern high level programming language.
Here are some other clichés, please, help me to find which one are valid, old-fashioned or simply fallacies:
- Java:
- Java is the paradigm of portability. Are Java programs more portable than Perl, Python or Ruby ones? Even my OCaml programs can be compiled in Windows, Unix and MacOSX without changes.
- Java is ineficient and produces memory leaks: Is this real? I have heard of (very) long running programs written in Java that exhaust the RAM memory. BTW, many others programming languages (including Perl), produces memory leaks in some circumstances, specially when dealing with circular data structures. Probably this can be applied to almost all programming languages with garbage collection, am I wrong?
- OCaml
- OCaml code runs nearly as fast as C code: Well, my experience is that, most of the times, only OCaml programs written with an imperative style can run that fast.
- Perl:
- Perl is slow:Well, it is interpreted, but, in my own experience, I found that it runs extremely fast doing some tasks (simple example, although I haven't compared the execution time with others programming languages).
- Perl is prone to obfuscation: There is too much to argue here, maybe it is a matter of taste. In my opinion, you can write pretty obfuscated or very readable code in Perl.
- Haskell:
- Haskell is for education: Have to take a look at the promising Real World Haskell.
- PHP:
- PHP is for web development: Well, it was originally designed for web development, but I have seen full applications (not web related) written in PHP.
Any additions, corrections and comments are welcome
citromatik