3 ms·
I disagree. perl made a point of adopting a lot of idioms from well-known languages. Some of it's more inscrutably named internal variables came from awk, for e
by pmccool 16y ago
I disagree. perl made a point of adopting a lot of idioms from well-known languages. Some of it's more inscrutably named internal variables came from awk, for example. Whatever perl's vices, indifference to least astonishment isn't among them. Admittedly, it's target audience was UNIX types. I can well imagine a good deal of astonishment, along with some other emotions, from those not in the target audience.
- jergosh 16y agoI agree that many constructs (s///, tr//, ``) will be familiar to someone with Unix background, but I'm not sure if they would qualify as a novice (many CS first years are unfamiliar, and in fields like bioinformatics -- where Perl happens to be the most commonly used language -- it's a rarity). But anyway, what about $_ and a host of other special variables? Pulling arguments to functions out of nowhere? Using regexps for simple string operations? Strings not being array? Using a special comparison operator for strings (without complaints when == is used)? length() not working on arrays (again, no warning) and $# returning index of last element rather than length? 'if' not being able to take a single statement? 'Last' instead of 'break', 'next' instead of 'continue', 'continue' doing something else?
- alextingle 16y agoI'm a Unix-type, and Perl still makes me want to cry.