The slot after a defn's parameters is about to become mandatory, and a void function has to have something to write there. () is ML's spelling and it cannot collide: an empty call is not a valid expression, so () has no reading in value position for a body form to be confused with. Additive on its own. Internally it stays Tname "Unit" -- the resolver, the shim and the emitter all speak that name and none of them change -- so this is two arms in parse.ml: texpr reads () as the unit type, and is_type_form says that a leading () is a return type rather than the first form of a body.
Description
Languages
OCaml
67.2%
Emacs Lisp
15.2%
C
10.4%
HTML
2.9%
Standard ML
2.8%
Other
1.5%