Ticket #11 (closed enhancement: wontfix)

Opened 11 months ago

Last modified 11 months ago

Change foreach loops to use visitor pattern as in D?

Reported by: JarrettBillingsley Assigned to: JarrettBillingsley
Priority: major Milestone: MiniD 2
Component: Language Keywords:
Cc:

Description (Last modified by JarrettBillingsley)

Possible reworking of foreach loops to use the visitor pattern (like in D) rather than the iterator pattern, to make it much easier to write opApply functions and much more efficient to loop over some things like tables.

Only problem with this is that you can do some really cool stuff with the current kind of iterator -- do a dynamic map, dynamic zip, wrap it in a generator coroutine etc. So this might not happen..

I don't think this is worth the (lots of) added complexity for a little extra speed in _some_ cases and less flexibility.

Change History

01/15/08 21:18:07 changed by JarrettBillingsley

  • component changed from component1 to Language.

01/17/08 15:33:59 changed by JarrettBillingsley

  • status changed from new to closed.
  • resolution set to wontfix.
  • description changed.