<br clear="all"><div>Dear all,</div><div><br></div><div>    I summarized some possible pitfalls people may encounter here(Ast Rewriter is also freely available </div><div>in Fan but used only in some areas similar to  <b>bisect</b>):</div>
<div>    </div><div><i> </i>   1. composition semantics unclear</div><div>        suppose we have three plugins A, B, C  which does the Ast rewriting.</div><div>        What's the difference between the composition A.B.C  and B.C.A?</div>
<div>        Suppose A a very naive plugin to remove all the unsafe expression, but B happens to </div><div>        introduces an unsafe expression? What should we expect here?</div><div>        </div><div>    2. compiling performance downgrading</div>
<div>       so far, Ast Rewriter is always doing global ast transformation which does a lot of un-necessary transformation, </div><div>       suppose you have a series of plugins which does global transformation ? Maybe it could be improved, but I don't</div>
<div>       see a clever way to fuse plugins.</div><div><br></div><div>    3. inconsistent semantics between compiling and toplevel module </div><div>        we could also do the Ast transformation in the toplevel, but the semantics is a bit different, this is also due to the fact</div>
<div>        that we are doing global transformation</div><div>       </div><div>    4. upgrading compatibility </div><div>        I suggest introducing an Intermediate Ast (for lots of good reasons I ever mentioned), if we *expose* too much compiler</div>
<div>        API, any change will break all existing plugins. Even though you use some nice utility like ast_mapper, people</div><div>        still use the Constructor name explicitly.   </div>-- <br>-- Regards, Hongbo