How is this different from the LISP and scheme macro system? The
program source is available to the programmer at both compile and
run-time and may be operated on arbitrarily (transforming code, adding
code, removing code, specializing code, making new "primitives",
modifying other macros, etc). There is a reason for LISP's syntax, it
is so you can program arbitrary semantics on top of it.
MetaOCaml gives you runtime code generation but is not really a macro
system (in the LISP sense of adding/changing semantics of constructs).
Caml4p gives you access to the OCaml AST to do arbitrary compile time
things, but nothing at runtime. So both OCaml solutions are a bit more
limited than the general LISP mechanism.
Andrew
On Fri, 2004-10-22 at 00:55, Vikram Adve wrote:> This sounds ambitious and should be very interesting, if you can make
> it work. The closest example I have heard of is work on
> metaprogramming (or partial evaluation) by exposing a compiler's parse
> trees to the programmer, but I suspect that is more limited. I don't
> know specific references offhand but one of the papers on MetaOCaml
> (which takes a different approach) may have citations to such work.
>
> --Vikram
> http://www.cs.uiuc.edu/~vadve
> http://llvm.cs.uiuc.edu/
>
>
> On Oct 21, 2004, at 3:20 AM, Simon Funk wrote:
>
> > Hi,
> >
> > I just wrote up a recent project which I think would be a natural
> > fit with LLVM. I'm curious if y'all see this working well or
if you
> > can see
> > any gotchas. Also potentially interested in finding someone
> > comfortable
> > with LLVM who would like to collaborate:
> >
> > Executive summary: What if the syntax and semantics of a programming
> > language were specified in a library, rather than built into the
> > language, and thus could be swapped or extended at will just like any
> > other library?
> >
> > http://www.interstice.com/journals/Simon/20041021.1.h.html
> >
> > -Simon
> >
> > _______________________________________________
> > LLVM Developers mailing list
> > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> > http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev