Settings

Theme

OCaml – Compiling Mini-ML to JavaScript

lexicallyscoped.com

40 points by fredyr 11 years ago · 4 comments

Reader

zeckalpha 11 years ago

Awesome! This should demonstrate to the masses how easy it is to make language transpilers in ML family languages. Can't get much simpler than that.

simplify 11 years ago

For representing `if` statements in JavaScript, what was the reasoning for using a function over a ternary?

  • fredyrOP 11 years ago

    I changed from the ternary representation to the function, because I didn't think the generated code was very readable. In hindsight I'm not sure it's that much improvement. From a performance view it's probably worse off.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection