On 2012-03-30 10:36, Andrej Mitrovic wrote:
On 3/30/12, Walter Bright<newshou...@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;

I agree.

That's what people are already doing with various D libraries.
Then, unittests could be moved into a central place.

Yeah, that's working just fine.

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.

If any abstraction (or what to call it) becomes too large then you just create another one.

If method becomes too large - split it up in several methods
If a class gets too many methods - split the class in several classes
If a module gets too many classes - split the module in several modules
If package gets too many modules - split it up in in several (sub) packages
If a library gets too many packages - split it up in several libraries

--
/Jacob Carlborg

Reply via email to