M. Edward (Ed) Borasky wrote: > I wanted to learn web application design specifically rather than > Ruby. I suppose I should have picked PHP to learn, since a lot more > web apps are written in PHP than Ruby/Rails. I may yet learn PHP, but > certainly from the point of view of language design elegance, Ruby is > light-years ahead of the "big three" scripting languages -- Perl, PHP > and Python. > > Strangely enough, the one "wart" on Ruby in my opinion is the > continuation of the UNIX/vi/awk/sed/perl "tradition" of regular > expression syntax and semantics. I appreciate its usefulness and its > ubiquity, certainly, but it is decidedly awkward to me, even after > having used it for 20 years. Using it represents a thinking mode shift > for me; it's as if my programs are speaking two different languages. > Perhaps Matz can earn a lasting place in the computer science Hall of > Fame by developing a more elegant way to do these tasks "The Ruby Way". In thinking further about this, perhaps the regular expression syntax/semantics is no more a wart on Ruby than are the older "traditions", dating back to Fortran, of * arithmetic expressions and assignment statements, mixing real and integer values, * procedures and functions which take parameters and, in the case of functions, return values, and * arrays of elements indexed by integers. They are simply "sub-languages" that every general-purpose language must contain to support the two main low-level uses of computers, number crunching and text processing. They are the DNA of computing, as it were. Still, I'd love to see a more elegant way to do string processing than something like Perl's $_ =~ s/^\[.+\] //g; -- M. Edward (Ed) Borasky http://linuxcapacityplanning.com