oot module design principals
the language should protect you from your coworkers
- you should be able to prevent your co-workers from depending on internals in your code
- however, as per everything-is-an-interface, your coworkers should still be able to extend your code to work with anything that matches the signature of its public interface
- furthermore, your coworkers should still be able to extend your code to produce things that act almost like your code, except in some cases, and that are substitutable for your code, but that don't lose functionality or substitutability as you change your code
- not sure how to do that btw
toread
ML Modules and Haskell Type Classes: A Constructive Comparison http://lambda-the-ultimate.org/node/1558
http://www.quora.com/Haskell/What-are-the-main-weaknesses-of-Haskell-as-a-programming-language likes both Standard ML’s and OCaml’s module systems
racket has "a component (or module) system as expressive as ML's,[12], Flatt, M.; Felleisen, M. (1998). "Units: Cool Modules for Hot Languages". Programming Language Design and Implementation. http://www.ccs.neu.edu/scheme/pubs/pldi98-ff.ps.gz
racket "The next major revision was named Version 200, which introduced a new default module system that cooperates with macros.[19] In particular, the module system ensures that run-time and compile-time computation are separated to support a "tower of languages."[20] Unlike units, these modules are not first-class objects." Flatt, M. (2002). "Composable and Compilable Macros". International Conference on Functional Programming.
http://docs.racket-lang.org/guide/units.html http://docs.racket-lang.org/guide/unit_versus_module.html
ML functors
what are modules?
- namespaces
- units of compilation
- units of linkage and particularly dynamic linkage
- units of type system inference
- units of package management
- units of pluggable dependency, e.g. compile-time specification of type functions, e.g. ML Functors i think
- unit of security boundary
- source code files and directories
- named? if so, then versioned (so that you can load two different versions of the same module at the same time)
- contain function defns and also type defns (the fully qualified pathname of fn and types includes their module name)
- can be loaded separately from other modules (except for dependency constraints)
package management
everyone seems to love npm (Node's package manager), should learn from it.
modules and files
modules are files; like Python
OOP access modifiers
starting a field/method name with '_' makes it protected
oot module design todos
oop vs modules: Objects vs modules as units of reuse?
@deprecated annotaton