News for hackers. Stuff that matters.
Re:Why Is the Migration to Python 3 Taking So Long? by bobbylarrybobby on Thursday November 14, 2019 @03:53PM (#21539269)
JS and Java can do that because they were designed reasonably well from the start. All they tend to add are more features on top of the solid core language. Python's language was not solid (e.g., strings not unicode by default) so they needed a major overhaul.
Re:Why Is the Migration to Python 3 Taking So Long? by teh_klev on Thursday November 14, 2019 @04:45PM (#21539804)
> JS and Java can do that because they were designed reasonably well from the start.

Javascript was knocked up over a week or so. Sure it implements concepts from Scheme and other languages but it was certainly not "designed reasonably well from the start". Otherwise we wouldn't have needed books such as Crockford's "Javascript The Good Parts" to help us understand areas of the language to avoid/misuse.

> Python's language was not solid (e.g., strings not unicode by default)

From the article:

"Python itself predates the first volume of the Unicode standard which came out in October 1991."

Re:Why Is the Migration to Python 3 Taking So Long? by downerending on Thursday November 14, 2019 @04:15PM (#21539509)
Kind of an odd slam, given that Python (and most other widely used languages) predated Unicode.

In any case, I think the jury is still out on whether Unicode in the primary string type is a good idea.

Re:Why Is the Migration to Python 3 Taking So Long? by colejohnson66 on Friday November 15, 2019 @08:21AM (#21544515)
Didn’t C# come out after Unicode (1990s vs 2000)? And they still didn’t implement it properly. Instead, they went with the horrible UCS-2 because it made interfacing with the Windows API easier (it uses wchar_t (16-bit) and UCS-2).
Re:Why Is the Migration to Python 3 Taking So Long? by int_19h on Friday November 15, 2019 @03:11AM (#21543161)
It's funny that you should bring up Unicode strings as an example. Java strings aren't Unicode by modern standards - their char is fixed as 16 bits, because back in the day, UCS2 was "good enough for everybody". So the moment you have, say, an emoji, stuff like length() and indexing is no longer dealing in actual codepoints. And you can slice in the middle of a surrogate pair, and end up with an instance of String that's not even valid UTF-16.

Python didn't get Unicode until later, so it had a chance to do it right - and it finally did, even on platforms like Windows where wchar_t is also 16-bit for historical reasons.

Re:Why Is the Migration to Python 3 Taking So Long? by petre on Thursday November 14, 2019 @04:20PM (#21539565)
I wouldn't call Js a reasonably well designed language but at least it supports Unicode strings.