version(number) is completely useless

Walter Bright newshound2 at digitalmars.com
Sat Jul 23 19:53:26 UTC 2022


On 7/22/2022 8:06 PM, H. S. Teoh wrote:
> Maybe something like this?
> 
> 	version(build1234) {
> 		version = FeatureA;
> 		version = FeatureB;
> 		// etc.
> 	}
> 
> 	version(build1235) {
> 		version = FeatureA;
> 		version = FeatureC;
> 		// etc.
> 	}
> 
> 	...
> 
> 	version(FeatureA) { ... /* feature A implementation here */ }
> 	version(FeatureB) { ... /* feature B implementation here */ }
> 	// etc.

Awkward since you cannot import versions from other modules.


More information about the Digitalmars-d mailing list