DMD 0.170 release

Bruno Medeiros brunodomedeiros+spam at com.gmail
Wed Oct 18 03:06:16 PDT 2006


Tom S wrote:
> Lars Ivar Igesund wrote:
>> 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.
> 
> 
> Thanks, Lars :) Indeed, I'm not saying that the feature is superfluous, 
> I'm just trying to find a better way. For instance, the older 'trailing 
> delegate' proposal could make foreach obsolete by allowing totally 
> custom foreach-alike loops to be created. Last time I mentioned it, 
> Walter seemed to like the proposal, but there was one open problem - 
> namely that if I had code like:
> 

If there is another, even more general way than foreach-on-delegates, it 
may or may not, be better than foreach-on-delegates and make it 
superfluous. But as D currently stands, foreach-on-delegates is not 
superfluous, or less simple to the language. I find the otherwise: it is 
quite natural and better than using mixins hacks (even if the difference 
isn't that much). I've favored this feature ever since Oskar Linde(I 
think it was him) made some posts about using different kinds of 
iterators in foreach(using that wrapper hack), and the idea that the 
language itself could support it, like it does now.
But as for foreach_reverse, I do agree that it is very superfluous and 
way, way specific.



-- 
Bruno Medeiros - MSc in CS/E student
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D



More information about the Digitalmars-d-announce mailing list