More operators inside `is(...)` expressions

Steven Schveighoffer schveiguy at gmail.com
Wed Aug 26 11:44:22 UTC 2020


On 8/26/20 3:52 AM, Alexandru Ermicioi wrote:
> On Tuesday, 25 August 2020 at 12:55:34 UTC, Steven Schveighoffer wrote:
>> On 8/25/20 3:12 AM, Alexandru Ermicioi wrote:
>>> On Monday, 24 August 2020 at 12:28:27 UTC, Stefan Koch wrote:
>>>> 1) Complicating the rules for is expressions further
>>>
>>> It will complicate a lot more since, you can do type matching chains 
>>> in is expression:
>>>
>>> ------
>>> is(T : Z[], Z != X, X : SomeType)
>>> ------
>>>
>>
>> That doesn't look valid according to the grammar. Or if it passes, it 
>> may not do what you think it does. You sure this works?
>>
> 
> Ah, sorry for bad english. It should be "could do type matching" not 
> "can". If support for negation is added inside is expression, then it 
> should also be supported in such chains as above, not just the simplest 
> case as suggested by other people in this discussion.


No worries! My point actually was that I don't think such "chains" are 
valid, even without the !=. Do you have a valid case that works today 
(without !=)?

-Steve


More information about the Digitalmars-d mailing list