The cycle of programming languages

The following cycle never ceases to amaze me:

  1. People learning programming find “real” languages such as C++ or Java filled with too many “complex” constructs.
  2. They find or invent languages such as Javascript or PHP or BASIC and think they can get the job done without “unnecessary complexity”
  3. As these programmers develop, they develop increasing complex programs, and find that constructs such as classes, inheritance, exceptions, generics/templates, errors upon encountering undefined variables, and static typing help them debug their code and write better code quicker.
  4. They then add these features to their programming languages and everyone rejoices believing they’ve done something new and great.
  5. Other programmers – just starting out – find the current set of languages to be too complex as they contain features they don’t understand they need, such as classes, inheritance, exceptions, etc.: go to step 1.

I mean PHP5 includes features such as classes, exceptions, and “phpdoc”, similar to Java. When displaying an uncaught exception, the $ex->__toString() method even returns a stack backtrace just like Java. (But global errors – which different to exceptions, as they were invented before PHP5 – do not).

And now Axel has blogged enthusiastically about the improvements to Javscript in the next version. I agree that these are great improvements, but believe it is incorrect to applaud Javascript for these improvements. These are simply useful features which exist in other languages; one can applaud Javascript for realizing they are useful, however at the same time one must observe that they did not realize they were useful when designing previous versions.

I also started programming using BASIC. It did not have advanced constructs such as abstract classes and exception handling. I did not know I needed them when I started programming. So I can certainly sympathize with people at step #1 above.

But it is incorrect to treat languages such as (the original versions of) Javascript or PHP or BASIC as anything other than beginners languages, useful as a stepping stone in the process of learning to program. If you want a programming language for writing expressive and maintainable software, it would seem less effort to just to use existing languages which already have the necessary constructs for doing so, rather than extending beginners languages with constructs identical to these existing languages.

One Response to “The cycle of programming languages”

  1. max Says:

    very interesting to read, i could’t sleep last night, because i had to think very much about this post ;)

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

For inserting HTML or XML please remember to use &lt; instead of <