3 ms·
Honestly, I think the only thing that sticks out to me is that JavaScript treats addition and catenation as the same thing, and, humbly, I don't think they are.
by andrewmcwatters 8y ago
Honestly, I think the only thing that sticks out to me is that JavaScript treats addition and catenation as the same thing, and, humbly, I don't think they are. Maybe some folks here more intimately familiar with good type handling can give their two cents.
But, I've enjoyed dynamic typing in languages where values had types and variables didn't, and because there wasn't any consolidation of addition and catenation, everything was fine. Also type coercion seems to be a pain point in JavaScript for some, whereas explicit type conversion through function calls in other languages seems to remove these issues, in my experience.
And TypeScript seems to bring a lot of powerful concepts to developers who enjoy the benefits of strict typing, which is great.
But, languages that continually expand their grammar complexity and usage conventions feel harder to master to me. Now and again I come back to Lua's reference manual and learn something new that I don't see other developers in that space recognize, and that's the simplest practical scripting language I know. It's complex syntax in Backus-Naur form is one section of the reference manual.
ECMAScript literally has multiple chapters to explain its grammar. I just don't understand how you can truly master that. At least, you certainly would not know all of the edge cases with the language.
- combatentropy 8y ago> type coercion seems to be a pain point Yeah: Boolean("0"); // true I believe type coercian should pass through the types from simplest to most complex. false; // boolean, the simplest data type Number(false); // 0, number String(Number(false)); // "0", string, so Boolean("0") should have been false