[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] Re: sequences egg
From: |
Felix |
Subject: |
[Chicken-users] Re: sequences egg |
Date: |
Sun, 21 Nov 2010 18:08:12 +0100 (CET) |
From: Hans Nowak <address@hidden>
Subject: Re: sequences egg
Date: Sat, 20 Nov 2010 15:26:27 -0500
> On 11/18/10 10:03 AM, Felix wrote:
>
>> I've put together a little library of generic "sequence" operations,
>> and would like to get some feedback, since I'm not sure about the
>> nomenclature and API. Find it here:
>>
>> http://wiki.call-cc.org/eggref/4/sequences
>>
>> And in the repo, usual place. It has a test-suite, but surely contains
>> some bugs, and is a bit of a test for the "fast-generic" extension.
>>
>> Comments, suggestions, rants or critique is welcome.
>
> This is more of a question rather than criticism, but... Scheme
> already has a (more or less) established nomenclature for certain
> actions. For example, to take the length of something, you use length,
> string-length, vector-length, etc. There are more of these: -ref,
> -map, -fold, etc.
>
> So, I wonder, why not use the same conventions? Instead, I see names
> like 'size', 'elt', etc. Wouldn't it be clearer to use names like
> sequence-length, or, if that is too verbose, seq-length, etc...?
I wanted to avoid name-clashes. For example (the admittedly somewhat
silly (sillily? siciliy?) named) `smap': `map' is so basic and used
all the time, that a generic operator named identically would just
slow-down normal non-generic code and would be awkward (import
warnings and all that). I also would like to keep the operators
short and concise. But clearer it would be, that's right.
cheers,
felix