DIP10005: Dependency-Carrying Declarations is now available for community feedback

Jacob Carlborg via Digitalmars-d digitalmars-d at puremagic.com
Sun Dec 18 03:47:06 PST 2016


On 2016-12-18 01:34, Andrei Alexandrescu wrote:

> Yeah, std/datetime.d is a monster, from what I can tell owing to a rote
> and redundant way of handling unittesting. I didn't look at its
> dependencies, but I doubt they are special. I was quite vocal about
> breaking it up, but I got mellower with time since (a) someone measured
> its size without unittests and it was something like one order of
> magnitude smaller, and (b) there was really no more trouble using or
> maintaining it than with anything else in Phobos.

Most other languages don't have inline unit tests, which saves a lot of 
lines of code.

Not sure if this is the case. But if we have unit tests that are more on 
the functional/integration side perhaps those should be moved to a 
separate file structure.

> I should also add that each large project has a couple of outliers like
> that. I even recall a switch of a couple thousand lines once :o).

Just because another project is worse doesn't mean we're in a good position.

Rubocop, the major linter in the Ruby world, will complain if a class is 
more than 100 lines of code. I think that is on the extreme side but I 
think any module with more than 2000 lines of code is too big.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list