Fully dynamic d by opDotExp overloading

downs default_357-line at yahoo.de
Sun Apr 19 01:41:29 PDT 2009


Daniel Keep wrote:
> 
> 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

Very true, but the _index_ should always be a constant.



More information about the Digitalmars-d mailing list