-
Erwan Jahier authored
In short, the rationale for this change, is that it is having a recursive node_exp is - useless, - too complicated, - wrong w.r.t. nesting iterator calls In long: - It is useless because, at the Eff level, a node cannot call itself via one of its static arg (which was where the recursivity came from). - and indeed, it is much simpler to consider that a static arg node can only be ident.long that identifies a node alias. This means of course, that nested iterators have been unnested before, inventing alias node names along the way... And polymorphism makes thing difficult once again. - But the *big* problem with a recursive node_exp is that it make things very complicated to (lic)dump nested iterator call because of polymorphism! Actually, it even makes thing complicated when the iterators were themselves not nested in the source code ! Some ugly things were done in LicDump to unnest those calls when printing node_exp. But this uglyness have a price: tricky code, and bugs! Indeed, nested iterators calls were wong for example when using the --inline-iterator mode (but i would not be surprised that is wrong in other cases...). Hence, LicDump is simpler, but of course LazyCompiler is more complicated. But this is reasonable: a pretty-printer is not supposed to be complicated.
Erwan Jahier authoredIn short, the rationale for this change, is that it is having a recursive node_exp is - useless, - too complicated, - wrong w.r.t. nesting iterator calls In long: - It is useless because, at the Eff level, a node cannot call itself via one of its static arg (which was where the recursivity came from). - and indeed, it is much simpler to consider that a static arg node can only be ident.long that identifies a node alias. This means of course, that nested iterators have been unnested before, inventing alias node names along the way... And polymorphism makes thing difficult once again. - But the *big* problem with a recursive node_exp is that it make things very complicated to (lic)dump nested iterator call because of polymorphism! Actually, it even makes thing complicated when the iterators were themselves not nested in the source code ! Some ugly things were done in LicDump to unnest those calls when printing node_exp. But this uglyness have a price: tricky code, and bugs! Indeed, nested iterators calls were wong for example when using the --inline-iterator mode (but i would not be surprised that is wrong in other cases...). Hence, LicDump is simpler, but of course LazyCompiler is more complicated. But this is reasonable: a pretty-printer is not supposed to be complicated.