ch-ch-changes

Denis Koroskin 2korden at gmail.com
Wed Jan 28 01:20:27 PST 2009


On Wed, 28 Jan 2009 12:07:16 +0300, Nick Sabalausky <a at a.a> wrote:

> "Andrei Alexandrescu" <SeeWebsiteForEmail at erdani.org> wrote in message
> news:gloppm$1vog$1 at digitalmars.com...
>> Jarrett Billingsley wrote:
>>> On Tue, Jan 27, 2009 at 11:15 PM, Andrei Alexandrescu
>> [...]
>>>> Feedback welcome.
>>>
>>> This is some awesome stuff.  std.range and std.algorithm are really
>>> coming together into a compelling whole.  I don't know what else to
>>> say - _you_ seem to know what you're doing!
>>>
>>> It's a minor point, but in the docs, with all the templating madness
>>> it gets very hard to find the name of the symbol actually being
>>> documented.  For example:
>>>
>>> Filter!(unaryFun!(pred),Chain!(Ranges)) filter(alias pred,
>>> Ranges...)(Ranges rs);
>>>
>>> "filter" gets lost in the middle.  Could it be highlighted, or moved
>>> to the front (using a Pascal-like "func(params) : returntype" syntax
>>> instead)?
>>
>> Good point. Actually I've been experimenting with using "auto" for the
>> return type. That does work most of the time, but unfortunately ddoc
>> doesn't understand it. Then,
>>
>>> Also - "toe" is still a stupid name.  ;)  "first" and "last" would
>>> have been my first choices, they seem so obvious.
>>
>> Turns out toe isn't half bad when I was coding with it - all I needed  
>> was
>> something short and memorable.
>>
>> One problem with "first" is that it sometimes suggests something else.  
>> For
>> example, if I have a generator for the numbers 1 to 10 and have advanced
>> it a bit, gen.first suggests I'm looking back to the very first element,
>> not the state of the iteration. I agree that gen.head isn't terribly
>> evocative either, but then at least it doesn't evoke something wrong  
>> :o).
>>
>> Anyhow, how about doing what Haskell does? They use "head" and "last".  
>> And
>> at least we'd be able to blame *them* if anyone doesn't like the names
>> :o). Thoughts?
>>
>>
>> Andrei
>
> Isn't "tail" the standard counterpart to "head"? ("toe" just doesn't  
> sound
> good)
>
>

Tail is often used to denote anything but head (imagine snake).




More information about the Digitalmars-d mailing list