Take 5 different languages:
All of them are united by the fact that there is a '+' operator for string concatenation. This operator is logical - we want to add two lines - we add. I spent an hour trying to understand why the echo "str" + " yolo"
code echo "str" + " yolo"
returns 0
, but not what I want and my torments were resolved only with a startling discovery that concatenation is the '.' How do the creators of the language explain such a trick? What are the reasons for replacing an established operator?
cout << 2002;
or why in this or that languageelif
instead ofelseif
, etc. - Alexey Shimansky