I believe this is because the IF function in spreadsheets (and the IF
command in gretl also) is very straightforwardly conceptually linked to
the verbal description of how one would dictate the action
"If this happens do that, else do that"
Conditional assignment on the other hand uses a symbol that makes it
looks like it translates a different verbal description:
s = x==0 ? 0 : (x>0 ? 1 : -1)
Here the "IF" notion is replaced by a question mark so we imply a
question "is x equal to zero ?". Then we write directly 0... but in this
way, we have skipped any visual clue that the "0" after the ? is the
action IF the answer to the question is "yes".
So people get frozen. "Ok I see "x==0 ?" and I understand "Is x equal
to
zero?", fine. Is it? Is it not?" ... It is the question mark that
creates all the confusion I think, because it is one step prior to
consider the answer (the "IF") on which the possible actions will
depend. It appears to link a question to possible actions without
providing the possible answers in between that determine which actions
to execute.
Alecos Papadopoulos PhD
Athens University of Economics and Business
web:
alecospapadopoulos.wordpress.com/
skype:alecos.papadopoulos
On 24/4/2020 20:43, Riccardo (Jack) Lucchetti wrote:
> I find it extremely difficult to come to terms with the fact that many
> people consider conditional assignmment an obscure geeky thing, and
> then happily use the IF() function in spreadsheets with no apparent
> effort.