Tuesday, June 3, 2008

The perfect scripting language?

The "Linux Journal" has an article called "How to be a good (and lazy) System Administrator". It's interesting. It assumes you are good at writing bash scripts. It goes along with their heavy emphasis lately of Bash scripts.

Bash is far from being universal though. It's not on real unix boxes. And it's certainly not on windows boxes. There are no universal scripting languages. So which language to use? PHP obviously.

PHP is a clean language. Compare it to say PERL. PERL proudly claims there are more than one way to do anything you want. Problem is that everybody does it in their own goofy hard to follow style. It's a very dirty language that is difficult to understand because of this. Basically PERL has been built up by building scabs upon scabs upon scabs until anything and everything is a mess. PHP, Python, and the newer languages are clean. So if you want maintainability you do not use PERL but you can use PHP.

PHP has a good selection of library routines to cover almost anything you need. Whether you want to handle XML, HTML, CGI, CLI, Genetics, Math, Statistics, Physica, Chemistry, Text processing, etc., PHP has good free libraries for virtually everything. It's not as good as PERL. However the framework is in place if not complete and is actively being improved. Python and the other languages don't even have the framework in place.

Universal acceptance. PHP is available on most all boxes regardless of the OS. This makes the language boring to kiddies. But not to egoless programmers needing results PHP is perfect.

Why the Linux Journal still pushes niche scripting languages like BASH is disconcerting. Attempting to lead programmers down proprietary closed solutions is something I'd expect from M$, not the Linux Journal.

No comments: