[Issue 13717] `split` no longer defined by std.string

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Nov 12 09:19:40 PST 2014


https://issues.dlang.org/show_bug.cgi?id=13717

--- Comment #12 from hsteoh at quickfur.ath.cx ---
Here's a crazy idea: what if we introduce template wrappers for these
functions, so that the import only happens if the user code actually references
those symbols? For example:

-----
// std.string
auto split(Char1,Char2)(const(Char1) s, const(Char2) t) {
    import std.array : split;
    return split(s, t);
}
-----

So while we can't get rid of the dependency, at least users who don't need it,
won't need to pay for it.

--


More information about the Digitalmars-d-bugs mailing list