On Thu, 08 Sep 2011 20:58:53 +0300, foobar <f...@bar.com> wrote:

Recent threads discuss how D should incorporate a mechanism to version symbols/modules.
E.g. std.xml[2], std.io vs. std.stdio and std.regex[p].
My question is WHY?

D *already* employes Git and there is no point in reimplementing it inside the D language/tools.
I suggest this simple zero-implementation scheme [KISS!]:
use git tags to tag Phobos releases and advertise the decided upon version scheme in the docs. Make sure to document APIs with the minimum required Phobos release version [git tag!] and add a "Releases" web-page that documents API changes. If someone needs a specific (older) version of e.g. std.xml he/she will simply download the specific version of Phobos already available publicly online.

What happens when you want to use two libraries which require different incompatible versions of the same module?

How do you suggest to tag every book/article/etc. with a module/Phobos version to use?

Moreso:

Phobos pretty much walks hand-in-hand with Druntime and the compiler. You'll find that it won't be easy to make today's Phobos version work with DMD from two compiler versions ago. There's also the inter-dependencies between Phobos modules themselves.

Your advice could simply be extended to "if you don't want your code to break when updating D, don't update D".

--
Best regards,
 Vladimir                            mailto:vladi...@thecybershadow.net

Reply via email to