The ideal module system and the harsh reality

Adam Warski

13 Nov 2013.0 minutes read

I think most of us will agree that modularity is a Good Thing. However, while it is possible to create nice
modular applications, current languages do not offer a lot of tools that would make this task easier.
Hence we'll start by creating a (subjective) list of requirements for an "ideal" module system, just
to know how much more work is needed.

Then we will take a look at Java packages. We usually think about packages in a hierarchical way, yet
they are treated by tools as simple identifiers. We use them for scoping, but Java only supports
package-private scope. We could use them as a module system, but we create build modules instead.

I'd like to show two approaches to solving this problem. One is Veripacks, a Java/Scala library which
verifies transitive module-related annotations. Second is the module system in Ceylon, where modularity
is one of the main features of the language. I'll also compare with OSGi, and show how it differs.

Slides

Blog Comments powered by Disqus.