Why we need opApply (Was: Can we drop static struct initializers?)

Walter Bright newshound1 at digitalmars.com
Sat Nov 21 23:21:51 PST 2009


dsimcha wrote:
> If anyone sees any harm in keeping opApply other than a slightly larger language
> spec, please let me know.  Despite its having been superseded by ranges for a
> subset of use cases (and this subset, I will acknowledge, is better handled by
> ranges), I actually think the flexibility it gives in terms of how foreach can be
> implemented makes it one of D's best features.

Thanks for writing this. It's nice to have a compelling argument, and 
you gave one. Looks like opApply is staying.



More information about the Digitalmars-d mailing list