Clemens Hintze <c.hintze / gmx.net> 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