Fully dynamic d by opDotExp overloading

Daniel Keep daniel.keep.lists at gmail.com
Sat Apr 18 12:11:46 PDT 2009



bearophile wrote:
> downs:
>> bearophile:
>>> But a static foreach (on a static data structure that has opApply) is not doable yet, I think.
>> Foreach on a tuple is evaluated at compile-time.
> 
> Yes, that's the whole point of that Range!().
> But you can't use that trick on an associative array, or a struct with OpApply, etc.
> 
> Bye,
> bearophile

And you can't have it outside a function like you can static if.  Also,
there are various bugs relating to the values being iterated over
sometimes kinda-but-not-really being compile-time constants.

  -- Daniel



More information about the Digitalmars-d mailing list