3 ms·
ML lets you define just about any abstraction you want, and actually enforce it, both statically (using abstract types) and dynamically (using exceptions). The
by catnaroek 10y ago
ML lets you define just about any abstraction you want, and actually enforce it, both statically (using abstract types) and dynamically (using exceptions). The only thing that's limited in ML is which abstractions can be enforced using only static means.
- agumonkey 10y agoML is mostly sum and product types, function composition and induction (I never cared about patterns even though they're high grade convenience). The rest is up to my imagination I guess.
- catnaroek 10y agoThe module system lets you define abstract types. The module system is the first defining characteristic of ML, the zeroth being type inference. Without the module system, ML simply isn't ML. The importance of abstract types can't be overstated: they can enforce nontrivial invariants of data structures (e.g., that self-balancing search trees are actually balanced), by just reducing the scope in which they could possibly be broken, and without bringing in the machinery of dependent types.
- agumonkey 10y agoI don't disagree, but it doesn't contradict my point. ML module correlate functions. The basic feature that helped me are still there. I'd even say that without this I couldn't understand the value of Modules later on. Level zero functional programming enforce a strong thinking hygiene around parametricity. Modules and functors are just the next step.