chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] [PATCH] Adding iset to core and using it for Unico


From: Felix
Subject: Re: [Chicken-hackers] [PATCH] Adding iset to core and using it for Unicode-capable SRFI-14.
Date: Sun, 03 Feb 2013 23:38:19 +0100 (CET)

From: Alex Shinn <address@hidden>
Subject: Re: [Chicken-hackers] [PATCH] Adding iset to core and using it for 
Unicode-capable SRFI-14.
Date: Mon, 4 Feb 2013 00:44:27 +0900

> On Mon, Feb 4, 2013 at 12:17 AM, Peter Bex <address@hidden> wrote:
> 
>> On Mon, Feb 04, 2013 at 12:02:44AM +0900, Alex Shinn wrote:
>> > iset manages integer sets.  The srfi-14 proposed
>> > is a thin wrapper around iset, first translating chars to
>> > integers.  We could alternately remove the integer
>> > interface and just use chars for everything.
>>
>> That would require an entirely different implementation, wouldn't it?
>> At least, iset being based on bit-vectors wouldn't be able to
>> store characters as-is.
> 
> 
> Right now we have:
> 
> (define (iset-contains? iset n)
>   (... <lookup> iset n ...))
> (define (char-set-contains? cset ch)
>   (iset-contains? cset (char->integer ch)))
> 
> It's not a big change, but we could remove the wrapper:
> 
> (define (char-set-contains? cset ch)
>   (.. <loookup> cset (char->integer ch) ...))
> 
> Not much actual code is removed, but we do get rid of
> a whole unit and its exported bindings.

That would be nice, indeed.


cheers,
felix



reply via email to

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