DMD 0.170 release
Ivan Senji
ivan.senji_REMOVE_ at _THIS__gmail.com
Tue Oct 17 11:37:55 PDT 2006
Bruno Medeiros wrote:
> Walter Bright wrote:
>> Added foreach_reverse, which addresses a serious shortcoming.
>>
>> http://www.digitalmars.com/d/changelog.html
>
> foreach_reverse addresses a serious shortcoming? What is that, if
> instead of:
> foreach_reverse(Foo f; aggregate) { ...
> I can do:
> foreach(Foo f; &aggregate.opApplyReverse) { ...
>
> The latter form is both more general (allows any kind of iterators) and
> more simple/orthogonal (no extra special statements are needed).
>
Hmm, does foreach(Foo f; &aggregate.opApplyReverse) work/can be made to
work if aggregate is Foo[]?
If not, then I think foreach_reverse is useful.
More information about the Digitalmars-d-announce
mailing list