Catch

24 views
Skip to first unread message

Robert Virding

unread,
Dec 16, 2014, 12:59:30 PM12/16/14
to lisp-flavo...@googlegroups.com
I have been thinking again. The current LFE (catch ...) does exactly the same as the erlang catch. Not talking about try ... catch but just catch. The erlang catch is old and is from before try so it had to handle everything, exits, errors and throws. With try ... catch this is no longer necessary.

I would like the change LFE catch so that it is just for handling normal return and non-local returns using throw. It would re-signal exits and errors. This would make catch/throw a proper pair. But it would make it incompatible with the existing one.

It does not have a high priority so if someone is using catch then we can let it be.

Robert

Duncan McGreggor

unread,
Dec 16, 2014, 2:29:34 PM12/16/14
to lisp-flavo...@googlegroups.com
I think I've only used (catch ...) alone once or twice, and maybe only for a quick test of something? Dunno. Almost all my uses are (try ... (catch ...)).

For what it's worth, +1 from me for the change :-)

d

--
You received this message because you are subscribed to the Google Groups "Lisp Flavoured Erlang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lisp-flavoured-e...@googlegroups.com.
To post to this group, send email to lisp-flavo...@googlegroups.com.
Visit this group at http://groups.google.com/group/lisp-flavoured-erlang.
For more options, visit https://groups.google.com/d/optout.

anu...@cinova.co

unread,
Dec 17, 2014, 11:28:26 AM12/17/14
to lisp-flavo...@googlegroups.com
I am using try/catch extensively, but I have not really used catch by itself. 

The question that I have is if you should have it in the language at all, given that try/catch can do exactly what catch does. 

Best,

A. 
Reply all
Reply to author
Forward
0 new messages