Thoughts on versioning

bauss jj_1337 at live.dk
Thu Oct 28 08:08:42 UTC 2021


On Thursday, 28 October 2021 at 04:05:09 UTC, SealabJaster wrote:
> On Tuesday, 26 October 2021 at 01:19:29 UTC, Andrei 
> Alexandrescu wrote:
>> ...
>
> Throwing out another DOA idea but: Would a special `@version()` 
> UDA manage to get anywhere?
>
> For example
>
> ```d
> @version(1)
> auto splitter(...)(...){}
>
> @version(2)
> auto splitter(...)(...){}
> ```
>
> And then introduce syntax to specify which version to use?
>
> ```
> import std.algorithm : splitter at 2; // as an example.
> ```
>
> I've also been trying to think of a way where a specialised 
> versioning tool could be used (kind of like a package manager, 
> but purely for Phobos), but struggling to really come up with 
> anything concrete.

That's gonna create a dependency hell of packages because some 
packages will support specific versions for specific calls and 
other packages will support different versions for the same calls.


More information about the Digitalmars-d mailing list