Interesting new language
Jarrett Billingsley
kb3ctd2 at yahoo.com
Fri Jun 1 09:33:32 PDT 2007
"Bruno Medeiros" <brunodomedeiros+spam at com.gmail> wrote in message
news:f3p16p$2bfd$1 at digitalmars.com...
> LOOOOOOOOOOOOOOOOOOOOOOOOOL AWESOME. :D
> A friend of mine had mentioned this already, and I too was about to post
> it here in the NG, despite flagrantly OT.
> More seriously though, like anderson mentioned, it would be really cool
> (and maybe some good D publicity too) to implement a D lolcode compiler
> with mixin text macros. Anyone up to the challenge? (I don't have time for
> that unfortunately :S)
One problem with compiling the Lolcode into D code is that Lolcode seems to
be dynamically typed. We'd have to implement a variadic type, and things
get even trickier if Lolcode functions, when a syntax is decided for them,
are first-class and with variable numbers of parameters.
On the other hand, we already have the MiniD VM at our disposal, a
dynamically-typed language VM with first-class functions with variable
numbers of parameters ;) The only thing that would have to be changed would
be the lexer and parser; virtually all the Lolcode constructs have analogues
in MiniD code, and can be represented by a MiniD AST. This is all done at
runtime, though.
If we still want to use compile-time constructs for compiling the Lolcode
source, it might be better to compile to MiniD source, and then compile that
at run-time. Targeting the MiniD bytecode directly using compile-time code
would probably be pretty awful :S
More information about the Digitalmars-d-learn
mailing list