chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] Made a start with CHICKEN 5 proposal


From: Oleg Kolosov
Subject: Re: [Chicken-hackers] Made a start with CHICKEN 5 proposal
Date: Thu, 28 Aug 2014 09:41:01 +0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0

On 08/27/14 11:00, Peter Bex wrote:
> On Wed, Aug 27, 2014 at 01:50:13AM +0400, Oleg Kolosov wrote:
>> On 08/26/14 11:06, Peter Bex wrote:
>> But what if I'm writing something like a shell scripts ...
> 
> It sounds like you're looking for condition-case.  I think this takes
> care of the handling of various different kinds of exceptions in a very
> elegant way, and it's actually my favorite part of the whole condition
> system in CHICKEN (though, strictly speaking, not part of SRFI-12):
> http://wiki.call-cc.org/man/4/Exceptions#additional-api
> 

Yes, looks like the condition-case is the way to go for the mentioned
use cases. I've never seen it in real code though. Not sure why people
avoid it.

>> The essential part is the "type" of the error that happened, ideally a
>> list of symbols. It is equally important for the caller and the handler.
>> The symbols are words that form vocabulary. It is easier to agree on
>> than data structures.
> 
> That's exactly what condition-case leverages in order to offer its
> convenience.

I was trying to prove the point that having the simplest data model will
pay off in the end, because I find the conditions (and records) very
awkward to use in Scheme. This can be improved with macros and special
forms of course, but isn't the LISP is all about manipulating a lists of
things?

Let's stop this. I feel guilty of taking the discussion too far from
it's intended subject.

Could you please look at an adjacent thread by Mario about the behaviour
of set! on unbound variables?

-- 
Regards, Oleg



reply via email to

[Prev in Thread] Current Thread [Next in Thread]