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: Michele La Monaca
Subject: Re: [Chicken-hackers] substring function and bounds checks
Date: Wed, 6 Feb 2013 01:51:27 +0100

On Wed, Feb 6, 2013 at 1:35 AM, John Cowan <address@hidden> wrote:
> Peter Bex scripsit:
>
>> Scheme is about correctness.  If you provide invalid indices, you get
>> errors.  This will help you detect bugs early on instead of just keep
>> going on with a bad result of an incorrect computation until some other
>> thing fails much farther along.  This kind of thing also tends to sneak
>> in vulnerabilities, as you never *really* know what your code will do in
>> the face of inconsistencies.  "fail early and noisily" is good design.
>
> In fact, R5RS and R7RS in no way require this kind of correctness.

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!". The way it is, is the chicken way not the
scheme way.

Regards,
Michele



reply via email to

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