[Haskell-cafe] Compilers: Why do we need a core language?
AUGER Cédric
sedrikov at gmail.com
Tue Nov 20 17:12:33 CET 2012
Le Tue, 20 Nov 2012 10:49:01 -0500 (EST),
citb at lavabit.com a écrit :
> > What would be the point in doing so?
>
> Well, I don't know. Would it save some time? Why bother with a core
> language?
The compilation process might be slightly faster, but I guess it
wouldn't be much noticeable.
Also I guess having a core language eases porting to new architectures,
you "just" have to port a simple core language rather than porting a
complex language.
The semantics of the core language is also rather simple, so you can
use it to explain and understand how it works, then for the high level
part, you can give a semantics by compilation to the core language.
Finally, adding a new feature seems easier and less error prone if you
have to translate it into the core language rather than compiling it
directly.
I never studied the Haskell compiler so I do not know the details, but
I think that having a core language is a good idea.
It is also good to have some VM to porting purposes.
If you have N source languages and M target machines, by providing N+M
stuff, you get N×M compilers !
>
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
More information about the Haskell-Cafe
mailing list