[prev] [thread] [next] [lurker] [Date index for 2006/12/12]
Robert Rothenberg <robrwo@xxxxx.xxx> writes: > On 11/12/06 23:12 Peter da Silva wrote: >>>> One reason I'm down on Perl is that an awful lot of stuff that >>>> I find hateful in the shell is stuff that Larry Wall faithfully >>>> replicated in Perl.... >> >>> Such as? >> >> The things I mentioned several messages back, most expecially the ad-hoc >> syntax and complex macro-style variable substitution. > > What's complex about it? I *wish* Perl had complex macro-style variable > substitution. This is simple: format "~A ~A ~A" a-string an-array a-hash This is complex: print "$astring, @anarray, %ahash" Well, in fairness, this is actually the relative complexity: print "$astring, an array of length ", (scalar @anarray), "a hash with ", (scalar keys %ahash), "elements." ...or, worse, this: eval format "~S" an-array compared to this: string = '(' . join(', ', @anarray), ')' eval string ...assuming that you have only simple scalars in @anarray; if you don't the second example fails miserably. All of which libraries can work around but, hey, that way lies the Turing tar pit in which everything is possible and nothing is easy. I hate Windows because it has sunk so far into that tar pit that most developers can't imagine the daylight any more, let alone see that it might be achievable. Perl suffers from wanting to be any number of things, and by adding extra complexity and indirection to achieve it. It guesses what you want. It has stupid interpolation defaults, but you can't bypass them. It has a crazy level of complexity, well beyond anything useful, in the way you can describe variables and pass them to, say, a formatted output generator. Despite all of which Perl is still highly competitive against other popular languages -- not because it is any good, simply because everything else is worse. Daniel -- Digital Infrastructure Solutions -- making IT simple, stable and secure Phone: 0401 155 707 email: contact@xxxxxxxxxxxxxxxxxxxxxx.xxx.xx http://digital-infrastructure.com.au/
Generated at 22:01 on 27 Dec 2006 by mariachi 0.52