More Adventures with Perl
This Perl script updates a build directory from another directory. I keep thinking that there must be an easier way than the course I found. But my objective is to get C/C++ software written, not create the perfect perl script. So the first practical solution that presented itself was the one I took.
There is an old saying that "familiarity breeds contempt". I suppose that my familiarity with perl is arguable, but I find that the more I use perl, the more contempt I have for it. While it is better than C shell (csh) scripts, the design of the language is a hack. In many cases, it is not at all clear that perl saves an experienced UNIX/C programmer time compared to writing the same program in C.
Although perl is far from ideal, I still use it because there are few alternatives (and yes, I know that one alternative is to stop bitching and design and implement my own language). Python is one alternative that I have heard discussed. The Python language reminds of Occam - both languages make indentation syntaticly important:
First, the reader will note use of indentation in the source code. Python groups statements via indentation: a block of statements begins where the indentation increases a level and ends where the indentation returns to the previous level (for example below the def function definition and the for loop). As a consequence of this syntactic convenience the string construction line must be explicitly broken into two lines via a continuation mark \. I found this weird at first, but now I find it seductively appealing and addictive.
Learn about Python, the language that wraps itself around a problem to squeeze out a solution, swallowing it whole. by Aaron R. Watters
As a compiler developer, I find this deplorable, not "seductively appealing and addictive". By making indentation a part of the language, Python syntax becomes difficult (or impossible) to represent in a grammar. Like Occam, Python is a language designed by people who didn't understand computer language design and implementation. At least the perl language can be formally defined.