ch-ch-changes

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Wed Jan 28 14:23:02 PST 2009


Jason House wrote:
> Andrei Alexandrescu Wrote:
> 
>> Jason House wrote:
>>> I think algorithm signatures should not be made unnecessarily
>>> complex, and instead rely on other utilities for complex behavior.
>>> For example map!("a*a")(r1,r2) can be implemented as
>>> map!("a*a")(chain(r1,r2))
>> Yah, good point. I'm ambivalent about that. On one hand composition is 
>> nice, on the other hand map is likely to be used very often so a 
>> shortcut is welcome. What do others think?
> 
> Very often with multiple ranges? I wonder how well dmd will inline/optimize when composing simple things like that.
> 
>  
> 
>>> I also see in the docs that the structs returned are documented,
>>> complete with all the functions that they include.  I'd hope that we
>>> could somehow document this stuff simpler...
>>>
>>> Maybe the following? outputRangeType!(r) map!(fun)(r)
>>>
>>> note also how accepting only one range also makes documenting the
>>> return type easier ;)
>> I'm waiting for that "auto" return feature to work with ddoc...
> 
> That really has very little to do with the point I was trying to make. The return type will conform to a certain range type, which is all I will ever want to know as a user.

Oh, I see now. Well, we don't have that in D today.

Andrei



More information about the Digitalmars-d mailing list