chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Using irregex safely & responsibly


From: Jim Ursetto
Subject: Re: [Chicken-users] Using irregex safely & responsibly
Date: Mon, 11 Oct 2010 12:42:20 -0500

On Mon, Oct 11, 2010 at 02:51, Peter Bex <address@hidden> wrote:
> On Mon, Oct 11, 2010 at 01:17:49PM +0900, Alex Shinn wrote:

> However, in case of substring and index operations, the result is
> always an integer/a string.  Returning #f is completely unambiguous
> in those cases, so I don't see the need to add yet another procedure.
>
> It would be preferable to have this behaviour:
>
>  (irregex-match-substring <m> <invalid-i>)    => error
>  (irregex-match-substring <m> <unmatched-i>)  => #f
>
>  (irregex-match-start-index <m> <invalid-i>)    => error
>  (irregex-match-start-index <m> <unmatched-i>)  => #f

I agree with Peter, the /default procedures seem like a needless
abstraction as a totally unambiguous #f is common practice.  For
example, srfi-13 string-index.  Unless this practice is going to be
deprecated somehow by R7RS.



reply via email to

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