| Your ideas about what is "logical" are completely arbitrary. Look, I can make up rules too: * '5' - 3 should return '5', since it's the string '5' minus all the instances of the character '3' in it. There is no other logical outcome! * '5' - 3 should return an empty string, since it's the string '5' with the last three characters removed. There is no other logical outcome! * '5' - 3 should return '2' -- since we started with a string, the result should turn back into a string. There is no other logical outcome! * '5' - 3 should return 50, since the only logical way to do math on a character is to take the UTF-8/ASCII value of it and then do the math. There is no other logical outcome! * '5' - 3 should return undefined, since subtracting from a string typically doesn't produce a reasonable result. There is no other logical outcome! You have provided absolutely no rational basis for discriminating between the merits of these choices, so your claim that Javascript's choice is one of exactly two "logical" ones is bizarre. If you think Javascript's choice is better, give a reason why it's better, don't just say that it's better. |