UFCS for D

Andrej Mitrovic andrej.mitrovich at gmail.com
Fri Mar 30 01:36:29 PDT 2012


On 3/30/12, Walter Bright <newshound2 at digitalmars.com> wrote:
> There has been a trend in Phobos of having some truly gigantic modules. I
> believe this is indicative of a problem in the language.

Ignoring that there are still a few import bugs, you can split
functionality into multiple modules and use one module per package
that publicly imports all modules in that package:

module std.datetime;
public import std.date.time, std.date.clock, std.date.watch;

That's what people are already doing with various D libraries.
Then, unittests could be moved into a central place. I think that
could cut down the linecount quite a bit. If linecount is still a
problem after that, then either the modules have to be further split
or it might be an indication that Phobos is getting too large.

Why would the language be at fault here?


More information about the Digitalmars-d-announce mailing list