6 ms·
>Actually you don't need another contruct than goto. You don't even need functions. >But for some reason given the choice, people use them. There is no choice
by CodeArtisan 8y ago
>Actually you don't need another contruct than goto. You don't even need functions.
>But for some reason given the choice, people use them.
There is no choice when it come to functional programming because the paradigm is based
on Alonzo Church model of computation known as Lambda calculus which is declarative:
Everything is an expression or, more specifically, a function. Because of that, statement
like goto are forbidden. Goto is from the Alan Turing model of computation known as the Turing
machine which is imperative; everything is a statement.
Guy Steele said that the lambda expression in Scheme is the ultimate GOTO because it's
like an unconditional jump while remaining declarative and functional.