Get the latest tech news
Imagining a language without booleans
Let’s start where I started. Just thinking about if statements.
If you have good mathematical intuition you might notice the asymmetry between the type rules for and and or and suspect that we’re missing some sort of generalization. No need to understand what it does (I certainly don’t remember the details), we just need to rewrite it in this hypothetical language and see how it compares. The closest thing I’ve seen is fallible expressions in Verse, but those are pretty different because they (i) don’t assign a value to an if without an else, and (ii) involve speculative execution.
Or read this on Hacker News