|
|
|
|
|
by gampleman
221 days ago
|
|
Exactly. For a web dev oriented example, I would call coffeescript a transpiler, since it would transform # some comment
myFun = ->
alert 'Hello CoffeeScript!'
into // some comment
var myFun;
myFun = function() {
return alert('Hello CoffeeScript!');
};
clearly intending the output code to be quite readable (even preserving comments).Whereas Elm is a compiler since it transforms module Main exposing (main)
import Html
main =
Html.text "Hello Elm!"
into (function(scope){
'use strict';
function F(arity, fun, wrapper) {
wrapper.a = arity;
wrapper.f = fun;
return wrapper;
}
// about 4000 lines ommitted
var $author$project$Main$main = $elm$html$Html$text('Hello Elm!');
_Platform_export({'Main':{'init':_VirtualDom_init($author$project$Main$main)(0)(0)}});}(this));
Clearly not intended for (easy) human consumption. |
|