Language Versioning

KnightMare black80 at bk.ru
Sun May 26 22:03:06 UTC 2019


> pragma(dlangVersionAtLeast, 2017_11_25);
IMO pragmas are not very well in all cases.
For example I have thousands LOCs with using std.xml ver1, but 
current version is ver2.2. I dont want rewrite code to ver2.2, I 
should point to ver1.

In your case I see it like this:
import std.stdio;
pragma(dlangVersionAtLeast, 2017_11_25);
// I dont sure that it will work now
import std.xml;
pragma(dlangVersionAtLeast, Uptodate);
import std.anotherModules;
// or we can use some attribute @version("2017_11_15")

In my vision I request it explicitly:
import std.xml 1.*; // or
import std.xml 1.* : someFuncAndClassList; // or
import std.xml 2017_11;
// or/and setup some fixed date in project settings for implicit 
modules

I wrote my vision in topic 
https://forum.dlang.org/post/hgspjuiqjjtptdexwlus@forum.dlang.org
Probably better to continue talks in one topic.


More information about the Digitalmars-d mailing list