Transitioning std lib modules/packages

rikki cattermole via Digitalmars-d digitalmars-d at puremagic.com
Mon Nov 28 06:03:31 PST 2016


On 29/11/2016 3:01 AM, Andrea Fontana wrote:
> On Monday, 28 November 2016 at 13:51:13 UTC, Andrei Alexandrescu wrote:
>> On 11/28/2016 08:42 AM, Andrea Fontana wrote:
>>> On Monday, 28 November 2016 at 13:34:42 UTC, Andrei Alexandrescu wrote:
>>>> On 11/28/2016 04:13 AM, Andrea Fontana wrote:
>>>>> Hoping std.v2.stdio works and it's an alias to std.stdio.
>>>>
>>>> That doesn't work - how do you later make breaking changes to
>>>> std.v2.stdio? We'd be missing the very point of doing this. -- Andrei
>>>
>>> It's just an api level. When you need a breaking change all modules will
>>> be updated to v3 as alias except the edited ones.
>>>
>>> V3 it just like a commit-id on github.
>>
>> I see - although that's an awesome idea for github, it seems excessive
>> to bump the version of the entire stdlib when we want to transition
>> one module or package of it. -- Andrei
>
> It's just a simple tag. And I hope that breaking changes are not that
> frequent!
> I think that on worst case there will be a new api level every dmd
> release. It just happens, but in this way it is managed in a better way.
> If needed we can use API_LEVEL_DMD_2071_3 as identifier. But IMO
> PHOBOS_API_LEVEL_2 makes more sense.
>
> It would be really easy to mantain a back-compatibility. Just select the
> right api level, and you can still use new dmd version! Something
> similar really works fine with android api_level.

Instead of "API_LEVEL_DMD_*" this already works:

static if (__VERSION__ >= 2072)



More information about the Digitalmars-d mailing list