More operators inside `is(...)` expressions
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.com
Thu Sep 3 16:21:35 UTC 2020
On 9/1/20 2:36 PM, Ogi wrote:
> On Tuesday, 1 September 2020 at 14:00:19 UTC, Steven Schveighoffer wrote:
>> But Walter is never going to approve any changes here, as this is one
>> area where he will not budge, due to past experience with the C
>> Preprocessor abuse. So this discussion is only academic. Just use the
>> workarounds and move on.
>
> Whoever would do horrible deeds with `version` is still able to do all
> of them with `static if`, meanwhile the good guys are stuck with this
> wooden syntax. Seems a bit irrational to me.
>
> I feel like beating a dead horse. Surely it has been discussed ad
> infinitum. And after all, it’s not such a big deal, it’s not like you
> have to juggle versions in your code all the time. But things like that
> are no good for D’s public image.
Well I can tell that I don't mind the limitations of version at all, and
I enjoy the distinction. There are many features in a programming
language that are more powerful than others and could supplant them
(foreach/for/while/goto, overloading/templates, switch/if etc).
Economy of means is an underrated principle of writing code (and in
general). So if I'm in a place where version would fit, version it is.
Otherwise I decide, for a reason, that static if is to be reached for.
All of that would be hardly irrational.
More information about the Digitalmars-d
mailing list