DMD 0.170 release

Lars Ivar Igesund larsivar at igesund.net
Tue Oct 17 08:00:29 PDT 2006


Jarrett Billingsley wrote:

> "Lars Ivar Igesund" <larsivar at igesund.net> wrote in message
> news:eh2fl7$2n9g$1 at digitaldaemon.com...
>> Walter, you always say that new features shouldn't be added if they
>> fairly easily can be done with existing language constructs. Now, the
>> post below is about possible new features in D (of general interest and
>> with many possible applications), and it is shown how they can be used to
>> implement an existing (and specific) feature in D. I'm not sure if this
>> should be used as an argument for removing the new delegate-as-aggregate
>> feature, but
>> it certainly shows that the proposed features have merit.
> 
> While I agree that foreach_reverse seems superfluous with the ability to
> pass in any delegate as the container, the delegate-as-container is just
> _too damn cool_ not to implement.  I don't know about you, but I'd rather
> use a single ampersand than go through all that mixin-in and aliasing just
> to get it to work.  That, and with the delegate-as-container, you're no
> longer limited to just class members - you could have just a nested
> function
> which you pass in.  Without delegate-as-container, you'd have to create a
> dummy class with the appropriate mixed-in opApply to get it to work.

I'm just trying to play the devil's (that's Tom) advocate here ;) What I
think was shown by Tom, wasn't that the new feature isn't damn useful, but
that there might be better, more flexible and more powerful ways to
implement the feature, if it is possible with templates, then the sugar
shouldn't be any worse, and the possibilities one could gain for D in
general could be substantial.

-- 
Lars Ivar Igesund
blog at http://larsivi.net
DSource & #D: larsivi



More information about the Digitalmars-d-announce mailing list