3 ms·
As far as I know, Lisp was the first expression-oriented language, so the if-as-an-expression idea probably comes from there. In contrast to Fortran, in which
by bheadmaster 4y ago
As far as I know, Lisp was the first expression-oriented language, so the if-as-an-expression idea probably comes from there.
In contrast to Fortran, in which "if" was a strict statement, which doesn't evaluate to anything and cannot be used directly in assignment.