links-lang / links

Links: Linking Theory to Practice for the Web
http://www.links-lang.org
Other
332 stars 42 forks source link

A proper module system #337

Open dhil opened 6 years ago

dhil commented 6 years ago

As discussed during the previous Links meeting, the current module system is causing some issues, and rather than treating it symptomatically, we ought to design and implement a proper module system.

I envisage implementing the module system in stages, such that each stage successively increases the richness of the system, e.g.

  1. A simple namespace
  2. Encapsulation and abstract types
  3. Higher-order modules (i.e. functors)
  4. First-class modules
  5. Separate compilation (possibly relevant for some future compiler)

In principle each stage can be implemented by a different person. I am happy to lay the foundation, that is to implement basic namespaces properly.

I think Xavier Leroy's Modular Module System provides a good starting point for an initial implementation. As we start considering more advanced features, we may want to move towards Andreas Rossberg's 1ML approach.

The initial implementation is intended to fix the following open issues: #292 #278 #225.

SimonJF commented 6 years ago

Thoroughly agreed :)