[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Please rename TRY to something else

This page is part of the web mail archives of SRFI 34 from before July 7th, 2015. The new archives for SRFI 34 contain all messages, not just those from before July 7th, 2015.



>    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