John Porter wrote:
> ...I think an OO syntax would be better.  You know, something like
> 
>       try {
>               cough "outa here";
> 
>               catch {
>                       matawba => { sustain; },
>                       ebola => { overrule; },
>                       { punt; }
>               }
>       }

Heh, that's not OO-like syntax!  That's a switch statement!  :-(

Maybe this is "OO":

        attempt = new Try { cough "outa here"; };
        attempt.catch( matawba => { sustain } );
        attempt.catch( ebola => { overrule } );
        attempt.catch( { punt } );
        attempt.try();

Off I go...

-- 
John Porter

        Aus tiefem Traum bin ich erwacht.

Reply via email to