Here is a rebuttal.
The main statement I have to take issue with is:
The + operator is known to most of us as a symbol for addition, so it does not make sense to use it in [the instance where we want to concatenate strings]
How about C++, C#, Java and the various flavors of VB? Each of these languages have an overloaded + operator that performs concatenation.
Then as you read through the article you discover that the REAL issue is the fact that you can’t concatenate numbers by either using the concat() method or by using the + because numbers are … well … numbers.
For example VBScript, VB6 using variants and probably others have this same basic issue. If you are going to use the plus operator for concatenation and for math, you have to have rules about when it will be used for each. Since numbers are typically ADDED together and strings are typically CONCATENATED, it make sense the the default behavior would be for those behaviors to be primary in those instances. In the case where you want to concatenate two numbers, the obvious choice would be to somehow force them to be strings instead of numbers. And in all of the languages I know of where this is needed, putting an empty string in the chain of numbers you want to concatenate is how you achieve this behavior.
var newValue = “” + number + number
- WebForms vs MVC–The War Is Over - September 25th, 2014
- Create A Desktop Application using Angular, Bootstrap and C# - October 15th, 2015
- Are You Doing Angular Right? - November 5th, 2015
- Adventures Working With Angular’s $scope - November 26th, 2015
- Using Gulp to Bundle, Minify, and Cache-bust - January 28th, 2016
- Reactions to React JS and Associated Bits - March 17th, 2016
- An Explanation of the Flux Pattern - March 31st, 2016
- Ext JS 6 by Sencha - The Good, The Bad, The Ugly - April 7th, 2016
- Do This To Increase Your Client Side Web Development Speed - April 21st, 2016
- ES2015 Code Coverage and Jest (React JS Unit Testing) - May 5th, 2016
- 4 Reasons To Drop MVVM - July 27th, 2016
- You Can Start Using Node Today - August 2nd, 2016
- TypeScript and Electron The Right Way - September 6th, 2016