On Saturday, 28 April 2012 at 20:51:54 UTC, H. S. Teoh wrote:
On Sat, Apr 28, 2012 at 10:08:29PM +0200, SomeDude wrote:
On Saturday, 28 April 2012 at 20:02:12 UTC, q66 wrote:
>On Saturday, 28 April 2012 at 19:57:08 UTC, SomeDude wrote:
>>On Saturday, 28 April 2012 at 19:23:00 UTC, q66 wrote:
>
>So you don't agree version() is horribly half assed without
>AND/OR
>(how do you generate the same code for two different versions
>without copying or creating a new version covering both cases
>then?) and that "version = FOO;" makes no sense?
Sorry, with that, I agree. Nick Sabalausky proposed to remove
version entirely.
But I agree there could be something like:
version(LINUX|OSX){
...
} else {
...
}
But if you're gonna do that, might as well just fold the
feature into
static if. The point of having a separate version construct was
to
provide a very basic, simple, easy-to-implement and easy-to-use
way of
versioning stuff. I don't think it was ever intended to be a
full-fledged versioning system.
T
I really don't care how it's implemented or what its syntax is.
What I do want is begin able with a single glimpse, to see the
different versions of the code, without having the impression to
plunge into a "static if hell" with 5 levels of indentation.
Having a different keyword helps for this. Besides, a specific
keyword makes parsing code easier.