24-Apr-2013 19:56, Joshua Niehus пишет:
On Wednesday, 24 April 2013 at 12:03:52 UTC, Dmitry Olshansky wrote:
E.g. std.regex would import std.concept.random to get isUniformRNG and
rely on duck typing thusly described to use it correctly.
Thoughts? Other ideas?

how would this be different then limited imports such as:
import std.random: isUniformRNG;
?

No matter how it looks to you this line means:
pull in whatever is std.random and make symbol isUniformRNG visible.

Since compiler can't know (well that might improve but not anytime soon) that isUniformRNG is independent of static ctors/dtors and globals in that module it has to run both.

Strictly speaking what is required is breaking up modules more meaningfully.


--
Dmitry Olshansky

Reply via email to