Our template emission strategy is broken

David Nadlinger via Digitalmars-d digitalmars-d at puremagic.com
Wed Nov 11 09:13:02 PST 2015


On Wednesday, 11 November 2015 at 15:07:15 UTC, Andrei 
Alexandrescu wrote:
> Phobos takes about 600MB max to build.

When was the last time you did "dmd -unittest -main $(find std 
-name '*.d')"? On current master, dmd takes just below 9 GiB to 
complete the build.

Also, consider that many of the features in Phobos – apart from 
the underlying molasses consisting of std.traits and friends – 
are not really widely used internally. This is not surprising, 
considering that large parts of std.* are mostly a grab-bag of 
orthogonal stuff, and the unit tests are, as they should, fairly 
isolated. For example, how many Phobos modules actually use 
std.regex internally, let alone its compile-time variants (which 
we are quick to advertise)? What about range "pipelines" longer 
than the one or two stages you'd typically write in a unit test?

Apologies for maybe being a bit too confrontational about this, 
but I don't think anybody is helped by dismissing entire classes 
of problems just because they tend not to be so apparent from a 
library writer's perspective. If you were to, say, visit the 
folks at Weka, you might be surprised to see how easy it is to do 
the latter without even realizing so.

  — David


More information about the Digitalmars-d mailing list