Skip to content

Comment on Ask HN: Why Are Conditionals Important?parent

Comments

There are Turing-complete languages without conditionals, though...
... giving a straightforward encoding of not only conditionals, but also (one-layer-deep) pattern matching.

So you wrote a conditional out of something that didn't have one? But for that to work, something in the "If" has to decide whether to evaluate the first one or the second one. That is, there is something that is equivalent to a conditional somewhere in the parts that you use to build the "If".

This may come down to what the definition of "conditional" is, though...

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.