3 ms·
Conditional expressions are declarative. For example, every template language worth its salt has conditionals. A programming (i.e Turing complete) language req
by zarzavat 11mo ago
Conditional expressions are declarative. For example, every template language worth its salt has conditionals.
A programming (i.e Turing complete) language requires recursion or a construct of equal power.
- Starman_Jones 11mo agoThere is no recursive program that can't also be created by adding in more conditionals. It's turtles the whole way down.
- jact 11mo agoYou need unbounded recursion. Conditionals alone can’t do that. If you have some kind of conditional go to/jump if expression that’s a different matter.
- goatlover 11mo agoYou can't add all possible conditionals for every kind of loop/iteration, such as dynamic and infinite.
- cestith 11mo agoYou can emulate recursion with iteration and a push-down stack. If it doesn’t either recurse or offer both iterations (loops) and something that can act as a stack (at least an array or so) then it’s not Turing complete though. I have yet to see a stack or user-manipulable arrays in CSS.