Version Identifiers for Platforms / Architectures not supported by DMD

Alex Rønne Petersen xtzgzorex at gmail.com
Sat Nov 5 14:31:02 PDT 2011


On 05-11-2011 22:07, Jonathan M Davis wrote:
> On Saturday, November 05, 2011 20:48:32 Iain Buclaw wrote:
>> I have had a recent pull request regarding the updating of some of GDC's OS
>> and Arch version identifiers.
>>
>> https://bitbucket.org/goshawk/gdc/pull-request/2/make-some-system-and-cpu-ve
>> rsion
>>
>> Such changes include, aix ->  AIX; ALPHA ->  Alpha;  and a few more.
>>
>>
>> While I welcome any change suggestions, I would love to hear the opinion of
>> D users on the proposed change.
>
> dmd's version identifiers are annoyingly variable (e.g. linux is camelcased,
> whereas Windows is Pascal-cased and OSX is all uppercase). Most of them,
> however, are Pascal-cased, so for consistency, it's probably better to make
> them all Pascal-cased, but given the lack of consistency and the fact that you
> don't necessarily get any errors when you use an incorrectly-spelled version
> identifier, you generally have to look it up regardless, and if you always have
> to look it up, the exact casing doesn't necessarily matter.
>
> Still, I'd argue that version identifiers in general should just be Pascal-
> cased since that seems to be the most common casing used, and ideally, they'd
> be consistent.
>
> For acronyms, that would mean all uppercase, so assuming that AIX is an
> acronym, then AIX would be the correct way to go, and assuming that alpha
> isn't an acronym, then Alpha would be the correct way to go (I'm not
> particularly familiar with non-x86 architectures, so I don't know whether
> they're acronyms or not - though I'd guess that AIX is and Alpha isn't).
>
> - Jonathan M Davis

That's exactly how it is. :)

- Alex


More information about the Digitalmars-d mailing list