Negation of subclass properties suggestion

Sometimes you need to access a boolean property, that is placed deep down the inheritance hierarchy, and to keep things particularly readable and clear, you want to leave it written so.

For example:


Instead of:

isInnerClassPropTrue = true/false, 

the name of which is less clear to the reader.

I had a similar situation in code, when I needed to negate such an expression and had to do it like this:


And I realized how strange sometimes it is to put a negation mark before the class name and not property. But still, you can’t do this:


Or anything similar that could do the same thing.

Unfortunately, such syntax may conflict with “not-null assertion” mark (!. or !!) , and that’s sad, so I wouldn’t insist on that one.

But what about the idea itself?


You are correct, thanks. Should have known before, my fault.

Nevertheless, it does look a bit redundant here, right?)
Any other ideas? :smile: