Proof of concept for v2 - NO duplication, NO `static if` hell, NO difficulty with interoperability

Imperatorn johan_forsberg_86 at
Sun Oct 31 19:14:11 UTC 2021

On Sunday, 31 October 2021 at 18:37:04 UTC, Johan wrote:
> On Sunday, 31 October 2021 at 17:32:07 UTC, Andrei Alexandrescu 
> wrote:
>> I'd say if we get rid of autodecoding that would be a solid 
>> release attainable in good time. It would also provide a model 
>> for all future evolution - v3, v4, ...
> Hi Andrei,
>   Are you not worried about increasing the knowledge required 
> to use and understand D? What I mean is: if the _standard_ 
> library is going to be versioned, users will have to remember 
> the differences between all versions of it.
> I'm sorry to derail the topic of this thread, but rather than a 
> discussion of how to implement the versioning, I would like to 
> see a discussion first about what the user will see and how he 
> is supposed to use it. I think the implementation of it is the 
> easy part.
> Let's simply assume we have std.v2 without autodecoding, and 
> std.v3 with less GC and less exception throwing. What kind of 
> code would be 'hit' by this, and what would the new code look 
> like? Is the user expected to completely migrate to use std.v3, 
> or should he use a mix of std.v1, std.v2, std.v3? Will there be 
> autodecoding functions in v3? (perhaps with UTF postfix of 
> function name? Or is there no support and will the user have to 
> implement it himself?) What about the old versions of functions 
> that return GC'd data, or used to throw exceptions? Is the 
> whole of std.v1 going to be deprecated at some point?
> I think it'd be nice if there are a number of code examples 
> worked out, showing what things are supposed to look like in a 
> world with versioned standard library.
> regards,
>   Johan

Well, you're right in a sense. But I think this is more of a 
pragmatic question rather than structural / pedagogical.

We don't have the manpower to shift std in something other than 
doing it in small steps. So you have to make a choice. Small 
incremental changes vs bigger. And that choice can't be made "by 
itself" ie it depends on other things.

The best thing would probably be to keep std and make bigger 
changes. But then again, how to deal with breaking changes etc.

More information about the Digitalmars-d mailing list