Re: Please rename TRY to something else Tony Garnock-Jones 13 Aug 2002 18:08 UTC

>    What about "try/catch"? (try-with-catch)
>
> But aren't 'try' forms, for example Java's, Bigloo's, and SRFI [34]'s,
> always 'try-with-catch'?  What would a 'try' without a catch look
> like?

Heh :-) Interesting question. Like "begin", I suspect.

begin/catch, then? ;-)

(Originally a joke - but then I thought about it - not misleading, and
almost certainly doesn't conflict with any existing constructs, but
has a rather nasty non-functional flavour... on third thoughts, I'll
leave it as a joke.)

The only reason I thought of try/catch was that it capitalises on
other languages' keyword*s* for exception-related syntax. Hmm,
actually, if I were using it, it might also remind me that the catch
clause comes immediately after "try/catch", rather than the try clause
coming first... nah, the (<var>) bit is sufficient reminder...

Or maybe just "catch"?

	(catch (condition) (begin (print "Aaargh " condition)
				  (die))
		...)

Of course, CATCH and THROW already have heavy historical baggage. I've
just googled for CATCH in particular, and it conflicts with guile,
kawa, and rep, at least...

OTOH, "try" conflicts with Bigloo, and try-catch with kawa; try/catch
doesn't seem to be used by anyone google can find in half a minute...

Tony