Re: Exceptions and Objects
[email protected] (Piers Cawley) 16 Aug 2000 10:45:12 +0100
| Newsgroups | perl.perl6.language.flow |
|---|---|
| Message-ID | <[email protected]> |
Graham Barr <[email protected]> writes: > Also, I have come to dislike the name `exception', its too long for me :) > and who says we have to copy everyone else. > > Lookin in the thesaurus we get > > [Nouns] nonconformity [more]; unconformity, disconformity; > unconventionality, informality, abnormity, > abnormality, anomaly; anomalousness; exception, peculiarity; infraction > of law, breach, of law, violation of law, violation of custom, violation > of usage, infringement of law, infringement of custom, infringement > of usage; teratism, eccentricity, bizarrerie, oddity, je ne sais quoi, > monster, monstrosity, rarity; freak, freak of Nature, weirdo, mutant; > rouser, snorter [U.S.]. > > As perl is an exceptional language itself, why not have > `freaks' instead :) Note that exception has the advantage of being reasonably neutral on the good/bad axis, which means that when you do something like: try { while (42) { my $result = roll_the_dice; throw Exception::Winner->new($result); } } catch Exception::Winner { print "We have a Winner!"; } Then it doesn't seem quite so weird. Whatever word we end up with should convey the sense of 'unusual' without any negative connotation. IMHO of course. -- Piers