For some reason, I have a perfect recollection of my early programming mistakes. My first was not understanding why a perfectly reasonable test like this didn't work:pic.twitter.com/rSuqFdmGMD
You can add location information to your Tweets, such as your city or precise location, from the web and via third-party applications. You always have the option to delete your Tweet location history. Learn more
That's silly. Computers are fast; can't the compiler make that work? It turns out there's a family of languages that support commutativity of "or" and many other expected properties of logic, writ large: functional logic languages. But they never really left the research labs.
In a functional logic language, "a or b" isn't an operation on booleans. Rather, it creates a backtrack point where the current test you're performing is run twice: first with "a" and then, if necessary, with "b".
In these languages, failure isn't represented by a boolean called "false". Rather, it's a control-flow construct. In an "if" statement, failure runs the next backtrack and, if there are none left, jumps to the "else". Hence you can simply write:pic.twitter.com/O6qFJVXMhX
Python almost allows what you want: if a in (0, 1): print("hello")
OMG OMG TIM IM YOUR BIGGEST FAN PLZ GIVE ME VBUCKS!!!
Maybe you mean...? xD
yup yup banging the head on logic
Isn't this what the Ruby language is intended to accomplish? Code could flow more like human language. A lot of the quirks of the ruby language are due to this philosophy behind it. I'm not sure if that's relevant to what you're saying or not.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.