On Thursday, 26 April 2012 at 10:20:37 UTC, Jonathan M Davis wrote:
On Thursday, April 26, 2012 12:09:19 James Miller wrote:
which pretty much makes them completely useless unless
you only use the built-in versions.

That's not true at all. It just means that versions are either useful for something within a module or they're intended for your program as a whole and passed on the command line (e.g. StdDdoc is used by Phobos, and it's not standard at all; the makefile adds it to the list of compiler flags). But yes, it's true that if you want to define a version in one module which affects
another, you can't do it.

Is there any reason for that limitation? Seems like an arbitrary limit to me.

The library I am binding to uses ifdefs to let the compiler see the appropriate declarations in the header files. It would be nice in general for D to be able to mimic that capability, as it means you can have a "configuration" file with a list of specs that can be generated at build-time by something like autoconf.

--
James Miller

Reply via email to