[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 03:03:36 +0100 |
On Wed, Feb 6, 2013 at 2:18 AM, John Cowan <address@hidden> wrote:
> Michele La Monaca scripsit:
> 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.
Hi John,
I think it's not a matter of strict/laxness but rather of semantic.
(substring1 "foo" 0 10) --> crash, exception, whatever
(substring2 "foo" 0 10) --> "foo"
>From what I understand, thanks to the realm of the "undefined
behavior", substring1 and substring2 are both standard compliant, even
if they have quite a different semantic. So, to me the real question
is: which kind of semantic gives the user more power? You know my
answer and from this discussion I know the answer of veteran schemers.
I think we'll never agree but of course this is not a problem. Anyway,
thanks for your comments, John, I found them very sound and
constructive.
Regards,
Michele
Re: [Chicken-hackers] substring function and bounds checks, Moritz Heidkamp, 2013/02/05
Re: [Chicken-hackers] substring function and bounds checks, Felix, 2013/02/05
Re: [Chicken-hackers] substring function and bounds checks, Jim Ursetto, 2013/02/05