Modules or Packages

A module is a namespace (a distinct frame of the environment, if you wish) that contains definitions (bindings) of functions or types, and you can choose whether those bindings are visible outside the module (public) or not (private).

Modules or packages is the way to ensure encapsulation by appropriate export of symbols (names) and to establish clear separation of abstraction layers (usually defined and implemented as layers of DSLs).

Every well-crafted language has a well-defined module or package system with explicit exports and imports. Standard ML, Common Lisp, Haskell, Erlang, Go, Rust, Scala, Swift, and even Python has a good modules.

C++, Javascript or Java are fucking crap, as usual.

Last modified 16 months ago Last modified on Dec 6, 2018, 12:48:33 PM
Note: See TracWiki for help on using the wiki.