[dmd-internals] Fw: Fixing forward ref bugs for good

Jacob Carlborg doob at me.com
Sat Sep 17 02:26:54 PDT 2011


On 16 sep 2011, at 22:03, Don Clugston wrote:
> Fundamentally we're doing something which is contradictory (but so
> useful in practice that we desperately want to keep it!) I think a
> perfect solution is impossible.
> 
> I think we have four feasible solutions:
> (1)
> static ifs and mixins are expanded in the order they appear in the
> file. This is applied recursively until none are left.
> Finally, everything else is evaluated in parallel.
> (2)
> static ifs and mixins are expanded in parallel. This is repeated until
> none are left.
> Finally, everything else is evaluated in parallel.
> (3)
> Everything is evaluated in parallel, except for static ifs and mixins.
> If no static ifs or mixins, quit.
> static ifs and mixins are evaluated & expanded in the order they
> appear in the file. Repeat.
> (4)
> Everything is evaluated in parallel, including static ifs and mixins
> (but they aren't expanded).
> If no static ifs or mixins, quit.
> static ifs and mixins are expanded. Repeat.
> 
> All of these have surprising behaviour in some ways.
> -Don.
> 


So which one of these is preferable?

-- 
/Jacob Carlborg



More information about the dmd-internals mailing list