Request: new compiler constants

Daniel Keep daniel.keep.lists at gmail.com
Mon Jun 18 05:21:05 PDT 2007


A discussion in #d.tango has brought up the question of whether D
compilers should add a few new constants to their repertoire:

 __D_VERSION_MAJOR__
 __D_VERSION_MINOR__
 __D_COMPILER_NAME__
 __D_COMPILER_MAJOR__
 __D_COMPILER_MINOR__

I realise this information is available in std.compiler, however this
module does not exist in Tango.  What is more, it makes no sense for
Tango to add this module since it is not tied to a particular compiler
like Phobos is.

Also, there's the argument that Walter keeps forgetting to update
std.compiler, and this information is available to the compiler source ;)

This information will become really useful once D 2.0 comes out of beta,
as it will allow people to safely work out the language and compiler
version irrespective of their choice of library.

Something to think about, at least.

	-- Daniel



More information about the Digitalmars-d mailing list