3 ms·
That's an argument for types. While it's more convenient to use a language without types it's more error prone. So I guess in the end strong typing wins. >>>
by ofrzeta 7y ago
That's an argument for types. While it's more convenient to use a language without types it's more error prone. So I guess in the end strong typing wins.
>>> 0 + 42
42
>>> "0" + "42"
'042'
>>> "0" + 42
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: cannot concatenate 'str' and 'int' objects
>>> int("0") + 42
42