Re-thinking D's modules

foobar foo at bar.com
Thu Jul 19 02:18:56 PDT 2012


On Wednesday, 18 July 2012 at 08:08:21 UTC, Dejan Lekic wrote:
> There are several places for D module system to improve.
> One thing we discussed in the past is the versioning, and as 
> far as I remember, we did not come to any constructive 
> conclusion.
>
> Java has been criticised often for not having modules. 
> Apparently Java 9 SE will have them, and in my humble opinion, 
> Java 9 module system is going to be far more powerful (or 
> perhaps better word would be USEFUL) than what D currently has.
>
> More about Java Jigsaw: 
> http://cr.openjdk.java.net/~mr/jigsaw/notes/jigsaw-big-picture-01
>
> Why is this better? - Speaking from a (senior) software 
> engineer point of view, Java Jigsaw is engineered for large 
> systems where versioning, module-dependency, and 
> module-restrictions are very important.
>
> I do not like few things about Jigsaw, but most of the things 
> they plan there simply make sense, especially the versioning 
> and module-restrictions, which I urge D developers to take a 
> look and come up with something similar for D2 or D3... This is 
> extremely useful, and will be even more useful once we have 
> shared libraries where we can have N different shared libraries 
> that contain the same module, but different version of it...
>
> Kind regards

I'd say that this is going in the wrong direction.
I read an article a while ago that was really enlightening about 
this subject. The gist was that a module system is the wrong 
abstraction. Modules are an artifact of procedural thinking in 
that they are global. This hurts security, testability, etc.

Here's the link: bracha.org/newspeak-modules.pdf


More information about the Digitalmars-d mailing list