DMD 0.170 release

Jarrett Billingsley kb3ctd2 at yahoo.com
Tue Oct 17 07:23:55 PDT 2006


"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. 





More information about the Digitalmars-d-announce mailing list