[nem-en] declarative multi-staging (runtime specialization not
compile-time)
Korcan Hussein
korcan_h at hotmail.com
Sat Aug 5 17:11:40 CEST 2006
Nemerle macros gives us the ability to write partial evaluators at
compile-time.
NET 2.0 Reflection.Emit.DynamicMethod gives us the abiltiy to write partial
evaluators at runtime (runtime specialization, which is arguably more
powerful than compile-time variants). However using DynamicMethod to write
such code is low-level, i was thinking wouldn't it be a great idea to write
some syntax macros which gives declarative multi-staging support like
MetaO'caml/ML, and FreshO'Caml/ML. From what i know it would take adding 3
operators, quotation of code etc, etc.
With the ability todo both offline and online partial evalution and mix them
together elegantly the sky's the limit.
Also wouldn't Reflection.Emit.DynamicMethod be better for implementing
nemerle functions (or at least lambdas) instead of the current method like
in IronPython? also could this open up the opportunity for efficent currying
support? Lastly could this also be a good method for implementing
multimethods & predicate dispatching.
More information about the devel-en
mailing list