News for hackers. Stuff that matters.
Re:Why Python 3 Exists by shoyer on Thursday December 17, 2015 @02:29PM (#10753802)
This design doc from DyND (a possible NumPy alternative) has some useful references on this point: https://github.com/libdynd/libdynd/blob/master/docs/string-d...
Re:Why Python 3 Exists by rurban on Thursday December 17, 2015 @06:54PM (#10755622)
Nope. This is just a normal short-string implementation, inlined with 64bit systems, with a tag bit. Very common on every better VM.

This has nothing to do with (inefficient) encodings, and their bad historic namings, probably derived from perl.

Of course any name like byte2utf8 or just to_byte or b2u8 would have been better than encode/decode.

And of course cache size matters nowadays much more than immediate substring access for utf8, so nobody should use ucs-2 or even ucs-4 internally. This is easily benchmarkable.

Re:Why Python 3 Exists by 0x0 on Thursday December 17, 2015 @08:34PM (#10756032)
"Byte2utf8" is a pretty confusing name for a method, considering utf8 is a byte encoding of unicode... :)