Question about version ( ) keyword
Adam D. Ruppe via Digitalmars-d
digitalmars-d at puremagic.com
Mon Mar 21 08:01:27 PDT 2016
On Monday, 21 March 2016 at 14:51:48 UTC, Vincent R wrote:
> However I understand that this limitation allow a clear
> separation between different platforms...
That's exactly why it is done this way, so the platforms are
clearly separated from each other and always grouped together for
themselves.
When writing these, we try to copy/paste it from the specific
platform's documentation as a whole block so it is there and
correct without accidentally assuming a Linux function is the
same as a FreeBSD function (for example) just because a few of
them were and got grouped in an OR block, but the rest weren't
and got overlooked. Doing it separately makes sure we look each
thing up for the specific platform to get it right.
(Version does not support an or thing itself to force this, but
still if you really wanted to, you can static if or set shared
version identifiers, so it is possible, just the language and
library guidelines don't want you doing it that way.)
More information about the Digitalmars-d
mailing list