Personally I feel that people porting to specific architectures
should
maintain their differences in separate files under a /ports
directory
structure - lets say core.stdc.stdio as a cod example. The
version for
bionic would be under /ports/bionic/core/stdc/stdio.d, and that
is the
module that gets compiled into the library when building for
bionic.
When installing, the build process generates a header file of
the
bionic version of core.stdc.stdio and puts the file in the
correct
/include/core/stdc/stdio.di location.
Though it is fine to say using version {} else version {} else
static
assert(false); when dealing with a small set of architectures.
I feel
strongly this is not practical when considering there are 23+
architectures and 12+ platforms that could be in mixed
combination.
The result would either be lots of code duplications
everywhere, or
just a wiry long block of spaghetti code. Every port in one
file
would (eventually) make it difficult for maintainers IMO.
I agree. Submitted an enhancement here:
https://d.puremagic.com/issues/show_bug.cgi?id=11666