StrongerXi / soc

Compiler for a subset of OCaml
1 stars 0 forks source link

Implement currying #13

Closed StrongerXi closed 3 years ago

StrongerXi commented 3 years ago

Implementing currying in the interpreter gave quite a few insights into how to handle the following things in compilation:

  1. Currying, of course.
  2. External functions.
  3. Primitive operators.

It seems reasonable to say that, if you can't implement it in an interpreter, you probably can't do it in compiler, unless the language you write your interpreter in is rather limited.