6 ms·
As a native-English speaker, when I compare e.g. python's "x and not y" to a more formulaic "x && !y", it really doesn't seem to make much of a difference. I'm
by dooglius 7y ago
As a native-English speaker, when I compare e.g. python's "x and not y" to a more formulaic "x && !y", it really doesn't seem to make much of a difference. I'm curious if you were using a syntax highlighter, that may affect your experience.
- cm2187 7y agoBut it’s easy to forget how concepts you understand so well they feel natural and are burned in your muscle memory are foreign and difficult to others, beginners in particular. A way to measure that is to teach. When you try to explain simple programming concepts, you often realise what millage you have behind you.
- klyrs 7y agoOn the other hand, python gives us 'x is not y' which is equivalent to 'not(x is y)' and not 'x is (not y)'. Which can surprise even native English speakers
- benatkin 7y agoI tend to think of "is not" as an binary operator and my assumptions based on this hold true. I prefer to think of it as entirely separate from "not". I don't know if the compiler rewrites it to not(x is y) behind the scenes.