DMD 1.005 release

Anders F Björklund afb at algonet.se
Wed Feb 7 03:01:17 PST 2007


Walter Bright wrote:

>> Why is that evil? I think it's actually a great idea. "versions" are a 
>> sort of configuration that determines which code should be compiled 
>> and which code shouldn't. Storing this configuration in a separate 
>> file makes sense to me.
> 
> The right way to do versions that cut across multiple files is to 
> abstract the versioning into an API, and implement the different 
> versions in different modules.
> 
> This is a lot easier to manage when you're dealing with larger, more 
> complex code, although it is more work up front.


How would you use something like autoconf with this approach ?

Would it need to generate different Makefiles / D file lists for
different options/versions, instead of just -version statements ?
Example of things I am thinking about are "__WXGTK__", "UNICODE",
or "HAVE_OPENGL". With C/C++, they're usually in a config.h file.

--anders



More information about the Digitalmars-d-announce mailing list