I am still trying to wrap my head around this, which shows how to simulate control-flow without using an if
-statement.
I've been looking at basic logic today and learned that you can represent all logic with 1 (like NAND), 2 (AND + NOT, OR + NOT, etc.), or 3 logical primitives.
This makes me wonder if you can represent the if
-statement using just AND + NOT or OR + NOT (and what it might look like), such that a program loop would be able to evaluate an expression such as if (a) b()
, or something more complex like in the first link above.