Improving version(...)
Tomek Sowiński
just at ask.me
Tue Oct 19 13:15:29 PDT 2010
Dnia 19-10-2010 o 00:20:29 klickverbot <see at klickverbot.at> napisał(a):
> On 10/18/10 9:56 PM, Simen kjaeraas wrote:
>>> * require declarations for all version identifiers. Versions which are
>>> set from the command line should be explicitly declared, eg:
>>> version Lite = extern;
>>> version Demo = extern;
>>>
>>> That would make creating a bird's nest impossible.
>>> And currently, you can make a typo like:
>>> version(Linix) {}
>>> and it compiles happily. I don't like that. Especially when we have
>>> builtin names like D_Inline_Asm_X86_64!
>>
>> This is an awesome idea. ++votes
>
> +1 from me too, this could be one of the key parts of a long outstanding
> version() overhaul.
>
> What also bugs me about the current situation (despite the fact that I
> think numeric versions should be removed, but that's another story) is
> that the equals sign to define a new version seems very illogical –
> »version ~= someUserDefinedVersion« would make much more sense to me…
I like the explicit version declarations too. My share of bikeshedding:
/** Possible versions of AwesomestApp. */
version AweHome, AwePro, AweSome;
version AweExp; /// Experimental AwesomestApp.
--
Tomek
More information about the Digitalmars-d
mailing list