Generality creep

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Thu Mar 28 18:47:49 UTC 2019


On 3/28/19 2:41 PM, Andrei Alexandrescu wrote:
> On 3/28/19 2:30 PM, H. S. Teoh wrote:
>> The only way I can see this happening is if we start a new iteration of
>> Phobos, like std.v2.*
> 
> There'd be carefully carved subsets per capability, such as 
> std.v2.betterc.*, std.v2.nogc.*, std.v2.noexcept.*, std.v2.safe.
> 
> The capability sets can be combined in alphabetic ordering. E.g. 
> std.v2.noexcept.nogc.* has the subset that uses no gc and no exceptions, 
> but std.v2.nogc.noexcept does not exist.
> 
> Through the magic of public imports and aliasing there would be no code 
> duplication. Introspection could help, too, a la "define public aliases 
> for all @safe definitions in that module". Some improvements to ddoc 
> might be needed to "see" through aliases.

Oh, and druntime must go.

The whole distinction between the runtime library and the standard 
library is clowny and has more to do with poorly ported tradition from 
other languages, than with anything else.

We need one standard library that is entirely pay-as-you-go (e.g. empty 
main() means no library file is ever needed for linking) and that offers 
an opt-in continuum.


More information about the Digitalmars-d mailing list