From: Robert Dober Date: 2006-08-28T20:19:14+09:00 Subject: Re: (again) Rescue clauses on do/end blocks? ------=_Part_169127_8936090.1156763951189 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 8/28/06, Austin Ziegler wrote: > > On 8/27/06, Mat Schaffer wrote: > > > >> Would this be unreasonable? > > > >> > > > >> foo { > > > >> blah > > > >> rescue ExceptionA > > > >> handle A > > > >> rescue ExceptionB > > > >> handle B > > > >> ensure > > > >> finish things > > > >> } > > > >> > > Well re-proposing it anyway. I'm mostly curious if there's some > > fundamental problem with it that I'm not seeing. Since this > > particular syntax wasn't proposed the last time the discussion went > > around. > > IIRC, Matz thinks it's ugly (I can't say I disagree, even though I > desire the functionality). I think it's one of the few cases where > it's worth the ugliness to be orthogonal here. Unless we try to be orthogonal in a different way like e.g. do,begin => { end => } rescue => who am I to propose something here, but a short "symbol rather than keyword" is in my mind, maybe let us look at some enusre => see above { stupid ? # too overloaded cannot be used in the same line with stupid intelligent } { stupid ||| # just kidding intelligent <<< # see above necessary } { stupid ?? StupidError => se intelligent !! necessary } Hmm I think it was worth spelling it out => UGLY :( Robert > Most people won't like how {} with rescue looks and probably switch to > do/end if the need rescue. The *only* think I can think of is maybe: > > foo { bar rescue nil } > > Is that still the post version? > > -austin > -- > Austin Ziegler * halostatue@gmail.com * http://www.halostatue.ca/ > * austin@halostatue.ca * http://www.halostatue.ca/feed/ > * austin@zieglers.ca > > ------=_Part_169127_8936090.1156763951189--