3 ms·
Yep, this was a common Perl construct as well, since you could follow "or die" with a custom error string. I used to amuse myself (way back in the Stone Age, wh
by castillar76 6y ago
Yep, this was a common Perl construct as well, since you could follow "or die" with a custom error string. I used to amuse myself (way back in the Stone Age, when I was in college and didn't know better) by using amusing and unique invectives for error messages like 'or die "you son of a motherless goat"'. Not only did they make me giggle a little, they made searching code for the line that failed a little easier...
- saurik 6y agoYeah yeah yeah, but citing Perl to defend that something is readable doesn't win arguments ;P.
- kergonath 6y agoWell, some parts of Perl actually make a lot of sense.
- ycombobreaker 6y agoWhat did Larry Wall do to deserve that? Ruby cribbed the "or die" idiom (and others) from Perl because they were useful. At least let him own his good ideas along with the rest of the language.