News for hackers. Stuff that matters.
Re:Reason ML toolchain by RubenSandwich on Tuesday February 06, 2018 @08:58AM (#16316216)
This is a small nitpick but the line: "OCaml's compiler is pretty unique, it's a set of pluggable parts that can be replaced and used together." is inaccurate. Most modern compilers are broken up into backends and frontends now, e.g. LLVM, JVM, .NET, etc.
Re:Reason ML toolchain by nv-vn on Tuesday February 06, 2018 @10:38AM (#16316898)
Is the OCaml compiler really the same as those others though? I'd say it's more complex than that. It has a very large middle-end that most compilers don't. Things that are pluggable so far:

- Lexing/Parsing (ReasonML) - Preprocessing (PPX) - Backend (BuckleScript/js_of_ocaml)

Other parts of the compiler (not as pluggable?):

- Typechecking (which is really what makes it OCaml; TyPpx allows some changes) - Semantics (can be overridden with PPX somewhat) - Optimizations/middle passes (things like Flambda)

Re:Reason ML toolchain by pjmlp on Tuesday February 06, 2018 @09:26AM (#16316360)
As an example of such architecture already in the 70's.

PL/8, used by IBM for doing their RISC research.

An Overview of the PL.8 Compiler (1982)

http://rsim.cs.illinois.edu/arch/qual_papers/compilers/ausla...

Re:Reason ML toolchain by thangngoc89 on Tuesday February 06, 2018 @09:11AM (#16316281)
Hey author here,

I'll look into this and update the post accordingly. Thank you

Re:Reason ML toolchain by RubenSandwich on Tuesday February 06, 2018 @09:18AM (#16316317)
No problem. Thanks for documenting the ReasonML toolchain and how it relates to OCaml.