Transitioning std lib modules/packages
Ilya Yaroshenko via Digitalmars-d
digitalmars-d at puremagic.com
Fri Nov 25 08:39:24 PST 2016
On Friday, 25 November 2016 at 16:10:51 UTC, Andrei Alexandrescu
wrote:
> The recent discussion about std.random suggested that we need a
> transitioning scheme for certain modules and packages in std
> that provide different designs without breaking the existing
> ones.
>
> C++ has things like std::tr1 and #if __cplusplus >= 201103L. We
> also need to have separate names for modules that are redone
> with incompatible APIs, such as std.random or std.json. For a
> while now I was thinking along the lines of std.v2.random,
> std.v2.json etc. but that is misleading - it suggests the
> entire std has a v2 version from which we pick some specific
> modules. In reality, it's only specific modules that have a v2
> version. So I have a low-tech idea and a high-tech one:
>
> So if Ilya wants to merge his random work (heh) into std, he
> would start with std.experimental.random_v2, and then upon
> approval move that to std.random_v2.
The new Random module was builded in Better C concept in mind.
Comparing with ndslice, random module has precompiled code. And
we need to solve not only the naming problem. We need integration
with dub where we can select and download/override/recompile
appropriate desired version of a Phobos part like random.
This is very important for potential contributors and companies.
I think that Better C Phobos packages may have their own prefix,
like `ext.` (external extension from community). Or, better,
`mir.`, hehe
Thanks,
Ilya
More information about the Digitalmars-d
mailing list