Skip to content

No bad programming languages

I encountered some truly hideous source code today in a programming language in which I wouldn’t have thought hideous obscure code was possible:  C#.  It was my first real experience of abject horror when looking at the source code of a C# application. Obviously with hindsight it would seem that you can write hugely, dense, brittle and hard to understand programs in any programming language.  And yet I would not expect a C# source code to be this obtuse or brittle but I would expect a Perl script to be dense and hard to read.

It is not that I have anything against Perl as a programming language: it is a fine language.  I find that Perl’s motto of `There’s more than one way to do it.’ means that it is a programming language with (you guessed it) more than one way to implement most operations.  This flexibility is a double edged sword: it allows a lot of creativity in program implementation, yet it also means that a dozen Perl coders will produce a dozen radically different scripts for the same problem.  This makes Perl quite hard on beginners or infrequent maintainers of Perl scripts: as to understand any given Perl script requires an understanding of much more of the Perl programming language than it would for most comparable programming languages.

I digress.

I’ve known for years that it is possible to write awful obscure code in low level languages like C and C++ but it really hadn’t occurred to me that a high level language like C# could be abused to the same degree.  Thinking about this some more, it is not the fault of the programming language itself but of the programmer that is using it.

So, brittle obtuse code is the result of a bad programmer not a bad programming language: well except maybe Brain Fuck (but thats kinda the point).

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*