Erlang as "assembler"

Klacke klacke@REDACTED
Tue Aug 3 23:11:07 CEST 1999



> in Erlang, but if an application uses a lot of it, it might be easier to 
> use and debug if one could extend Erlang, and use a preprocessor 
> to convert the source into 'clean' Erlang. 

This is not a bad idea at all, 


> 
> One other example might have been the list comprehensions: if the 
> language did not provide them, someone might use a preprocessor 
> to 'compile' them into code. 
> 

And as it happens, list comprehensions are implemented that
way already. lib/compiler/src/sys_pre_expand.erl
This was easy to implement, the drawback is that lc's are
a bit slower that they could be.


> In the latter case, including that into the language is good because 
> it is a general improvement and it's also faster than using hand-
> coded routines. But when the change is specific, of limited use, I 
> think it makes little sense to include it into the language.
> 

We used to discuss a sort of kernel erlang a couple of
years ago, it should a minimalistic language (possibly
imperative) that could be used to compile all kinds of
transformations and language extensions into. It was never
realized though but I still think it was a good idea.


Cheers


/klacke




More information about the erlang-questions mailing list