playing around with D
BCS
BCS at pathlink.com
Wed Mar 7 09:09:03 PST 2007
Pragma wrote:
> BCS wrote:
>
>> Reply to Walter,
>>
>>> BCS wrote:
>>>
>>>> Why do the static asserts get processed later?
>>>>
>>>> I'd expect that having them get processed sooner would make things
>>>> work nicer.
>>>>
>>> There's always that chicken-and-egg problem of forward references.
>>>
>>
>> Ah!!
>>
>> Wild thought: I know it's to late to do this for for DMD but, what
>> would the problems be of doing a lazy evaluation of the AST?
>> I'm thinking something like; process the declarations and statements
>> in order (starting at the module level) and when you find a symbol you
>> don't know about go looking for it.
>>
>>
>
> Interesting idea. Maybe I'm just naive, but how would this be any
> different than just adding an additional semantic pass, while relaxing
> DMD's tendency to barf on unresolved symbols - or is that what you're
> proposing?
>
You can't do it in a constant number of passes because asserts can
depend on templates that depend on asserts that depend on templates ...
More information about the Digitalmars-d
mailing list