version(number) is completely useless

jmh530 john.michael.hall at gmail.com
Tue Jul 26 17:33:06 UTC 2022


On Tuesday, 26 July 2022 at 17:06:17 UTC, H. S. Teoh wrote:
> [snip]
>
> I guess so. :-D
>
> So maybe we need a DIP to add feature-based version 
> identifiers, e.g.:
>
> 	version(fixed12345) { ... /* bug 12345 is fixed */ }
> 	version(dip1000) { ... }
> 	version(intpromote) { ... }
>
> and so on.
>
>
> T

The bottom two are a bit separate. It makes perfect sense to add 
predefined versions for preview statements (it may even make 
sense to include even more than that, e.g. version statement for 
other D features that people may want to disable, but that's 
neither here nor there and a bit beyond the scope). I don't think 
it needs a DIP for that.

Bug fixes are a bit more annoying because there are thousands of 
them. I would still need to look up what bug 12345 was, even 
though it is at least more specific than the specific a DMD 
version. I think checking whether the buggy code is fixed with a 
traits _compiles is a little more obvious.


More information about the Digitalmars-d mailing list