3 ms·
Erlang modules hold nothing but functions. In most popular languages there can be mutable data, too, either public or private; this extra complication is what w
by abecedarius 15y ago
Erlang modules hold nothing but functions. In most popular languages there can be mutable data, too, either public or private; this extra complication is what would tip it over from interesting to silly in my mind. For Erlang it strikes me as worth exploring, and then maybe the result could be generalized to other languages.
He considers private implementation-only functions using letrec, but what about multiple public functions sharing the same privates? You can model them as an object (or rather a nullary function returning a tuple or some other representation of a table, since Erlang modules have functions only). Hurrah, we've reified modules, oh well.
I'll bet these points are addressed in the long followup thread.
(Obligatory mention of Zooko's triangle: http://www.zooko.com/distnames.html http://www.zooko.com/distnames.html )