Comment

Comment by lindig

The OCaml code for the Person module in that post is not not idiomatic. Also, a module is quite different from a class or JS object and it would be more helpful to think about a module implementing an (abstract) data type like in C or other procedural languages. There is no inheritance with modules and no dynamic dispatch. Once compiled, there is no selection of functions/methods at runtime.
parent lindig 11 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton