More operators inside `is(...)` expressions
Steven Schveighoffer
schveiguy at gmail.com
Sun Aug 23 22:45:10 UTC 2020
On 8/23/20 6:18 PM, Per Nordlöw wrote:
> On Sunday, 23 August 2020 at 22:11:41 UTC, Steven Schveighoffer wrote:
>> static if (is(int != T))
>> {
>> // use T
>> }
>
> Furthermore, what's wrong with allowing
>
> static if (int is T)
> {
> // use T
> }
>
> static if (int !is T)
> {
> // use T
> }
>
> ?
>
> Less syntax for developer to remember.
It becomes confusing when the symbols are not builtins, though it would
look a lot nicer.
But this is definitely a much more drastic change than just allowing !=
in the existing is-expression. I imagine the changes to the compiler
would not be simple for this.
-Steve
More information about the Digitalmars-d
mailing list