4 ms·
Well, if you compile python 2 code using Cython you also can run it in Python 3. But seriously: - C never did such change, it doesn't make as much sense for i
by takeda 6y ago
Well, if you compile python 2 code using Cython you also can run it in Python 3.
But seriously:
- C never did such change, it doesn't make as much sense for it to do it since it is low level
- C has a type static typing, so if they did, they could make compiler refuse to compile until types are right. Python has dynamic typing so these kinds of things show up when running, you can use something like mypy, but unlike C it is optional.
BTW: I saw people using Go as an example that there was no need to add unicode support like in python, and simply store everything as UTF-8. Those people are forgetting that Go already has clear distinction between text and bytes (via string, bytes, runes types), how the language stores text is just an implementation detail, since normally there shouldn't there be access to the internal representation of the text anyway.