5 ms·
I wonder if it will be one of the inferior technologies that were forced by Microsoft even outside of their Windows world. Like it happened with UEFI (that has
by xvilka 6y ago
I wonder if it will be one of the inferior technologies that were forced by Microsoft even outside of their Windows world. Like it happened with UEFI (that has no multithreading, uses PE as a format, Microsoft C ugly coding convention, bloated), SecureBoot (that was designed to stop anything non-Windows instead of real security), UTF-16 (everyone except them and JavaScript uses UTF-8), and so on. The list is long.
- aidenn0 6y agoYou can't blame MS for UTF-16. They adopted it when it was UCS-2 and unicode only had 64k codepoints. They are stuck on the older technology because they were early adopters.
- slaymaker1907 6y agoYou can't forget Java with UTF-16. I feel like Java is an even bigger culprit since the whole language assumes it and there are no real alternatives.
- pjmlp 6y agoNot only was Java created when there was no real alternative, modern implementations a more efficient representation internally, since Java 9 (we are at 15 now), just keep the outside interface as UTF-16 for backwards compatibility, we don't need a Python 3 experience. https://openjdk.java.net/jeps/254 https://openjdk.java.net/jeps/254
- zinekeller 6y ago> UTF-16 (everyone except them and JavaScript uses UTF-8) It's like blaming America's analogue colour TV implementation (NTSC) when in fact PAL and SECAM haven't been invented yet (and NTSC is partially responsible for PAL even existing).
- whereistimbo 6y agoUEFI originated from EFI which was first developed by Intel for use in Itanium platform. EFI saw widespread use on consumer devices pioneered by Apple on Intel Macs. I don't know how far Microsoft influence on EFI, because even Apple was responsible for widespread use of EFI on consumer devices.
- otabdeveloper4 6y agoWell, it could be worse. Python did the whole Py3k own-goal purely for the purpose of forcing everyone onto UTF-16. (Facepalm, yes.)
- sterwill 6y agoI wasn't following the Python 2-to-3 transition that closely, but I don't think Python ever forced anyone to use UTF-16. On Unix platforms (the only place I've used Python for 10 years) the strings are UTF-8 internally. On Windows maybe it's UTF-16, I don't know, but most programmers don't need to know or care. They just bytes(my_string, 'utf-8') to encode it as bytes.
- zinekeller 6y ago> for the purpose of forcing everyone onto UTF-16. Honestly, Py2 was a PITA when handling raw data, it could corrupt your data if you don't know exactly what you are doing. The goal was to separate (Unicode) text from binary data. It wasn't to UTF-16 though. In fact, you should just assume that text variables are encoded in Unicode points and not care whether it is UTF-16 or UTF-8 (and on Unix-like systems, it is definitely represented to UTF-8). If you are converting it into binary, at least you know what encoding is it: no "Oh no my Python code was broken on Windows/Unix" because even Py2 has already the UTF-16/UTF-8 OS split.
- otabdeveloper4 6y agoThe easy and sane path would have been to just mandate that str is encoded as UTF-8. (Indeed, that's what every other sane language seems to do.) Instead they tried to split every function into a 'wide' (str) and a 'narrow' (bytes) version, like in Windows. The whole idea of 'wide' strings is predicated on the idea that Unicode charpoints are only ever two bytes and that two bytes is all you ever need. This obviously doesn't work in 2020, and the Python folks tried to roll back their broken by design code that has immediately turned into technical debt right out the gate, but the warts still exist. (Like having to choose whether you open files with 'w' or 'wb', etc. No other language does this stupid thing, I think.)
- 6y ago