To cite an alternatice, in Tcl, `in` is an operator and its negation is `ni`. A cute pun and echo of Monty Python that I'm disappointed Python didn't follow :).
To cite an alternatice, in Tcl, `in` is an operator and its negation is `ni`. A cute pun and echo of Monty Python that I'm disappointed Python didn't follow :).
As to the "what else resembles this"? I would turn it around and ask what else could resemble this. I'm not sure the conclusion would be that "not in" is a good thing, but not sure of the reverse, either:
if x not = 3
looks weird, but I think I could grow to like it.Really '!=' is just an attempt at rendering '≠' using only ASCII characters. They're a bit like digraphs and trigraphs in C/C++, except everyone is used to them.
I wonder if Unicode is ubiquitous enough now that you could write a language where the real maths operators were used instead. What would that look like?
I'm currently using the Monoid font (https://larsenwork.com/monoid/), which uses ligatures to achieve the visual effect of things like the not equals symbol, while the underlying code remains the same. It's a pretty nice work-around for current languages.