chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] substring function and bounds checks


From: John Cowan
Subject: Re: [Chicken-hackers] substring function and bounds checks
Date: Tue, 5 Feb 2013 20:18:35 -0500
User-agent: Mutt/1.5.20 (2009-06-14)

Michele La Monaca scripsit:

> I never read them (I promise I'll do, at least R5RS) but I was kind of
> suspecting that no standard would ever tell you "if the input is such
> or such... then crash!".

Well, no.  But certainly the C and C++ standards, for example, give
*permission* to crash by using the phrase "undefined behavior".
In R6RS, it's the opposite story: essentially all behaviors are defined,
either to produce a certain result or to raise an exception of a certain
type, both of which the user can rely on.

> The way it is, is the chicken way not the scheme way.

To be fair, it is also the way of the great majority of Scheme
implementations.  And most Scheme systems are quite strict, simply
because it's easier to build lax code on top of strict code than the
other way around.  Given Scheme's extreme extensibility of both syntax
and procedures, this is perfectly reasonable: if you want lax behavior,
import a lax library instead of the base (strict) library.

-- 
John Cowan    address@hidden    http://ccil.org/~cowan
Half the lies they tell about me are true.
        --Tallulah Bankhead, American actress



reply via email to

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