LDC predefined identifiers

Leandro Lucarella llucax at gmail.com
Mon Jun 8 09:59:09 PDT 2009


Brad Roberts, el  8 de junio a las 09:19 me escribiste:
> Leandro Lucarella wrote:
> > Brad Roberts, el  7 de junio a las 18:53 me escribiste:
> >> Frits van Bommel wrote:
> >>> Brad Roberts wrote:
> >>>> I'm in the process of updating the version.html list of predefined
> >>>> identifiers.
> >>>>  I'd like to include the identifiers that are produced by LDC as well as
> >>>> validate that there aren't conflicts or contradictions between the
> >>>> compilers.  I
> >>>> know there was a thread about this a while back.  What's the current
> >>>> state for LDC?
> >>> Just search for "addPredefinedGlobalIdent" on this page:
> >>> http://www.dsource.org/projects/ldc/browser/gen/main.cpp
> >> Thanks.  I've added them.  I'm not particularly excited about the way this
> >> looks, but take a peek:
> >>
> >> http://www.puremagic.com/~braddr/phobos-trunk/2.0/version.html#PredefinedVersions
> > 
> > I'm wondering if it's ok to include compiler-specific switches into the
> > specs, isn't that against an specification? I guess it's better just to
> > list the "standard" identifiers only and let compiler documentation list
> > compiler specific ones.
> > 
> > I think the specs should be more and more compiler independent, not the
> > other way around =)
> 
> I'm fine with dropping parts, this was a starting point.

Ok

> On the table to drop from the docs:
> 
> 1) the entire Compiler Vendors block
> 2) darwin
> 3) freebsd
> 4) mingw32 ?
> 5) solaris
> 
> More?  Less?

I'm not sure about mingw32 either, but I think it's not used in LDC
anymore (at least I saw some commits that replaced the use of mingw32 with
Windows). I'll remove LLVM64 too, the Notes column (at least the
current notes about "XXX only") and comments about command line switches
(unless the command-line interface for the compiler is "standarized" too,
which can be nice but I don't know if that's the case).

> My goal is to document what users should know about being able to write code
> that will work with any D compiler.  Calling out the differences highlights
> problem areas that exist today.
> 
> It's _ok_ that the predefined version identifiers don't line up 100%, that's to
> be expected due to differences that don't cause grief.  For example, the cpu
> architecture differences and the 32 vs 64 bit differences.
> 
> What's not ok is solaris vs Solaris (for example).  That just adds confusion.
> I'm not going to be the guy to decide which is right.. the ldc developers and
> walter can yell at each other until one caves.  But, please, one side cave so
> there's just one.

Agreed. LDC support both, but having one of the flavors deprecated and one
officially supported (I mean, defined by the specs) should be ideal. It
would be *very* nice to have a consistent case for identifiers too
(please, don't stick to linux if all other identifiers are capitalized,
make Linux the official one and have the old as a deprecated identifier).

-- 
Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/
----------------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------------



More information about the Digitalmars-d mailing list