From: Dave Thomas Date: 2000-03-05T17:15:58-06:00 Subject: [ruby-talk:01730] Re: [Ruby] static buffers Clemens Hintze writes: > Dave> What about using parameter passing semantics: > Dave> rescue FriendlyException(friendly) > > > I like that syntax, but didn't that get confused with method calling? > I know it is not the normal way, but nowadays I could code something > like this: > > exceptions = [SyntaxError, TypeError] > > def Exception(val) > case val > when 1 > SyntaxError > when 2 > TypeError > end > end Yup - that's a problem all right. We could certainly go with a new syntax, such as you colon idea (which is nice and terse), or using something like rescue SyntaxError into e which is longer but perhaps more readable. Or maybe we could bite the bullet and make it a syntax error to have method names start with an upper case letter, thus allowing the Xxx(e) syntax _and_ cutting out a class or ambiguity problems in normal code. Would that be a major problem to enforce? Dave