To be fair, it’s not really enough to know what types are to get this one right. You have to understand that the + operator is overloaded based on the types of its operands; that is, + actually means several different things, depending on the operand types. The experience people have of + meaning numerical addition might be interfering with their learning. Maybe if someone else’s students had problems with it, they could try defining a function putTogether (a, b) and telling the students that it’s a mysterious black box that does one arbitrary thing for numbers and a completely different thing for strings. Then you could leave revealing that it’s actually the language’s + operator that has this strange behavior for later.
To be fair, it’s not really enough to know what types are to get this one right. You have to understand that the + operator is overloaded based on the types of its operands; that is, + actually means several different things, depending on the operand types. The experience people have of + meaning numerical addition might be interfering with their learning. Maybe if someone else’s students had problems with it, they could try defining a function putTogether (a, b) and telling the students that it’s a mysterious black box that does one arbitrary thing for numbers and a completely different thing for strings. Then you could leave revealing that it’s actually the language’s + operator that has this strange behavior for later.