Wojciech Meyer <wojciech.me...@googlemail.com> writes: > Hi, > > Jérémie Dimino <jere...@dimino.org> writes: > >> But there is something i don't understand here. Why is there camlp4 and >> camlp5 ? These two projects do exactly the same thing and are >> incompatible. So i don't see the point of maintaining them both. We >> should at least deprecate one. > > BTW: Are there any plans to add type reflection to Camlp4 (or Camlp5)?
Hi Jérémie, Sorry about OT. I'm asking, because certainly it would be a very wanted feature. I can see two major limitations of the current Camlp4/p5 system: - no way of recursively expand syntax, generate some code and then re-generate again using same syntax (staging, it's partially there as you can compose syntax extensions, but there is no way to keep expanding until fixpoint) - no way of making an action based on inferred type during previous stage of macro expansions. This is biggie. It needs either using `ocaml -i' hack or kind of type reflection support in the compiler. Also, a packrat lexless parsers with a way to compose them would be a huge thing too. I'm aware that these are huge changes to Camlp4, but it would make meta programming more powerful and push Camlp4 to the next level. People will mention about MetaOCaml (which is an excellent way for meta programming in OCaml), but here I'm more interested in syntactical abstraction than partial evaluation. Cheers; Wojciech -- Caml-list mailing list. Subscription management and archives: https://sympa-roc.inria.fr/wws/info/caml-list Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs