3 ms·
Isn't the existence of TypeError and the various things you're not allowed to do implicitly (eg: 1 + "a", something Javascript will happily let you do) a defini
by Karunamon 7y ago
Isn't the existence of TypeError and the various things you're not allowed to do implicitly (eg: 1 + "a", something Javascript will happily let you do) a definition of strongly typed?
- ben509 7y agoIf it's qualified as a "serious definition," they're setting up a No True Scotsman argument.
- kybernetikos 7y agoJavascript has type errors too, and Java will let you 'add' a string to an integer, so it's more nuanced than that... Javascript: > null.bob() TypeError: Cannot read property 'bob' of null > 4 >>> Symbol("four") TypeError: Cannot convert a Symbol value to a number > BigInt(null) TypeError: Cannot convert null to a BigInt > Object.create(false) TypeError: Object prototype may only be an Object or null: false Java: int anInteger = 10; String s = anInteger + "Hello";