News for hackers. Stuff that matters.
Re:TDD: tastes better without the T? by silentbicycle on Wednesday April 28, 2010 @04:11PM (#1302544)
The ML community usually calls them "functors".

For examples, a package which implements a data structure, say, a red-black tree. The module is parametric over the tree type, so you have module of type "(some record) rbtree". It customizes the module for those, at compile-time.

Or, a module that does a compiler's code generation, which takes another module which provides specification for the processor architecture.

Everything is typechecked, etc. at compile time. There's overlap with both the STL and Haskell's typeclasses, but in ML it's done as part of the module system.

There are no comments on this comment yet.