Live data from Hacker News

Why I'm Making Python 2.8

naftaliharris.com

201–210 of 392 posts

Re: Why I'm Making Python 2.8

#201

We should make this Python 4.0 and move on. Some high paid google engineers working the "official" 3.x will be pissed, but that's life. I am sad to see the schism in Python community.

A non-trivial number of people seem to want this, but why does it need to be called Python? Keep the syntax and C extension compatibility, but ditch the name. One could even work out a means of selectively bringing in ideas from elsewhere:

- Concurrency from Erlang (http://queue.acm.org/detail.cfm?id=1454463)

- String handling from Go (https://blog.golang.org/strings)

- Lightweight data classes (https://kotlinlang.org/docs/reference/data-classes.html)

- Syntactic macros from Nim (https://hookrace.net/blog/introduction-to-metaprogramming-in...)

- more from Lua, Julia, Scala, and Haskell (within reason)

There are already plenty of examples of Python modules that implement significant modifications (e.g. Cython, Rpy2, Dask), so I don't think it would really feel all that different from typical Python programming.

Re: Why I'm Making Python 2.8

#202

Earlier quoted context omitted.

Well, things change, especially in tech. For better or worse, but most of the time for the better. You should read some changelogs of past python 3 releases. 3.6, for example, has ordered dicts by default. Which is quite convenient when you need to write test testing a small dict with two items for example. I like driving an old muscle car, most of m look beautiful and bring me everywhere i want. But damn, those new…

Pretty sure they say NOT to rely on the ordered nature of the new dicts. So definitely not something you want to put in your tests.

The intention is to make the order guaranteed in 3.7 or 3.8, AIUI. There was some desire to prove the new implementation before guaranteeing its behaviours (i.e., in the worst case, if it turned out to be broken, they could revert to the 3.5 code and it would be valid).

Re: Why I'm Making Python 2.8

#203
post #33

> And the majority of Python code written does not run under any of the 3.x interpreters. This makes it harder for its users to be productive. What a load of bollocks. For new projects this only matters if libraries aren't ported, which they are for the most part. For old projects, either you're in a situation where you can spend time porting your code to Python 3, or you don't; but as TFA mentioned pep-404, the writ…

The Python Software Foundation has an obligation to defend the trade name. If it fails to exercise it, then it can be denied in the future. I don't expect litigation because that's not how the community rolls. I expect a polite message from gvr to the author asking to change the name. If that fails, the PSF has no choice. It's use it or lose it.

If that fails, the PSF has no choice. It's use it or lose it.

Or license it.

Re: Why I'm Making Python 2.8

#204
Hmmm. OK.

This is a bad idea. My guess is the author will not be able to call this thing "Python", and for good reason.

Should it exist? Sure. Why not? The nature of FOSS is that anyone can tinker with it and make it into whatever they dream. Go for it! Just don't call it Python.

I use both 2.7 and 3.x. No drama. New projects go through a "Do we see any issues with 3.x?" phase where we try to list libraries we'll need and check for support. Not that difficult.

I absolutely understand companies/people holding on to 2.7 for dear life. Converting a non-trivial working code-base would be costly and very difficult to debug if that code base doesn't have extensive test coverage (probably true of most). It would also be utterly irresponsible in most business cases.

Most businesses don't have software developers sitting around doing nothing. Revenue comes from existing products and new features along with bug fixing. No customer of a software product will pay one dime for a company devoting a year to port their entire code-base to 3.x. Can you visualize that announcement?

"We stopped delivering new features and fixing bugs a year ago. Instead we ported our entire product to Python 3.x. Today, a year later, we give you exactly what you were using a year ago. Enjoy!"

Yeah. Exactly. The huge sucking sound you'll hear is that of customers leaving the company throughout an entire year of nothingness. In a dynamic free market competitors would eat you alive as you stop delivering features and fixes while they zoom right past you with a better offering to your customers.

That said, sticking to 2.7 for the long haul --say, ten years from now-- will create the Python equivalent of old COBOL code still running in deep dark places within financial institutions. It will create codebases nobody wants to look at or touch. It will create codebases that will be anywhere from hard to impossible to support as libraries will surely evolve to support the 3.x and, eventually, 4.x branch.

It is perfectly sensible for a company to, given today's realities, stick to 2.7. This is almost exactly the problem described in "The Innovator's Dilemma". Good management means focusing on delivering what your current customers are buying and want to buy. Unless they are clamoring for your product to use 3.x it could actually be really bad management to make the switch.

The only way to do it correctly would be to hire a full parallel team of programmers to port the codebase while mirroring every single new feature and bug fix implemented as customer's needs are met. At some future point the two branches would achieve parity in function and reliability. This parity would allow seamlessly switching to the new codebase without damaging customer relationships. Of course, this would cost a ton of money for a non-trivial product and, at the end of the process, the company would probably have to fire one of the two teams. Pretty messy and costly in more than just financial terms, isn't it?

I am not advocating either approach. Just saying I understand this from both engineering and business perspectives. People pushing others to just switch are doing so from a frame of reference devoid of any understanding of the realities of business. Most businesses are not about the technology, they are about what problem you solve for your customer. They don't care about "the geek stuff" behind the curtains. And rightly so.

Live long and prosper.

Re: Why I'm Making Python 2.8

#205
post #11

Earlier quoted context omitted.

Isn't Jython (generally) dead? The main site seems to be stuck in 2015.

It's not dead, it's just really slow. The 2.7 release has been very long in the making, released only 18 months ago. There are stabilization releases to it still coming out. There's a tiny, but dedicated group building it and it shows. Jython 3 is possible if you're willing to put your money where your mouth is.

There's been an imminent 2.7.1 release for a while now, so that will likely eventually ship.

AIUI, some of those who were paid to work on it previously are now doing so only in their spare time.

Re: Why I'm Making Python 2.8

#206

Earlier quoted context omitted.

> What a load of bollocks. For new projects this only matters if libraries aren't ported, which they are for the most part. For old projects, either you're in a situation where you can spend time porting your code to Python 3, or you don't; but as TFA mentioned pep-404, the writing has been officially on the wall ever since 2011 so at that point you have to admit you did choose to incur tech debt and do nothing about…

> it's mostly blackmail ("port or else you wont run on 3, and we'll stop the 2.x line"). Would you also call the RHEL life cycle a blackmail? I'm using version 5 now and the normal support ends in March 2017. My options now are "port or pay extra for extended life cycle or else my RHEL will be without security fixes". And like Python, major RHEL versions break backwards compatibility.

And you went into that RHEL relationship with full information ahead of time. So, your comparison is terrible.

Re: Why I'm Making Python 2.8

#208
post #174

Earlier quoted context omitted.

Oh we are perfectly well aware of our encoding issues. In NumPy, one of the most important libraries in Python 2 or 3, strings always take one byte per character. And it's not going to change. So the built in csv module needs to support a reasonable behavior. Which it does not. If a company tries Python 3 and discovers basic things like CSV produce utter gibberish, they would do well to opt out. And they do--in drove…

>In NumPy, one of the most important libraries in Python 2 or 3, strings always take one byte per character. So I won't be able to use NumPy with either of my two native languages. That sounds like a bit of a shortcoming for the majority of the world.

Numpy isn't really used like that though. It's for numerical computation. There might be cases for putting text in there but you can always keep it locally and map it to an int that you use in numpy for mapping (I do that in places).

Re: Why I'm Making Python 2.8

#209

Earlier quoted context omitted.

You keep saying things like this but numbers don't bear that out. Since we switch to Python 3.5 for new code, I can barely tolerate working in 2.7 now. It went from feeling "vibrant" to feeling "OMG this is legacy" in about a week. I would never voluntarily go back.

> You keep saying things like this but numbers don't bear that out. What numbers? All the numbers I've seen -- official numbers from PyPY etc) tell otherwise.

https://twitter.com/vlasovskikh/status/801720613312364544

Re: Why I'm Making Python 2.8

#210
post #118
post #72

Earlier quoted context omitted.

Python 3 fixes no fundamental issues with python 2 and introduced far more warts than it removed. GIL is still there, crummy runtime is still there and unicode is now an even greater mess. I really wonder how many people who bang on about unicode actually have a good grasp of unicode and text processing because python3's unicode design is obviously terrible. I can now access or count code points in O(1) (neither of w…

It most certainly fixes support for Unicode on Windows in terms of filesystems paths, OS function boundaries and the console. Some of these fixes have even taken until 3.6 to get implemented. As someone who writes cross-platform code, Python 3 was a breath of fresh air after fumbling around in the dark with Python 2.

I can definitely believe that – but windows has basically lost[1] and a much worse text model to boot. Like Java and unlike python 3, they at least have the excellent excuse that this was not obvious at the time. And under unix the impedance mismatch has definitely increased. Not a good trade.

[1] I wouldn't count them out, but they're definitely on the back foot as bash inclusion shows.

Post reply on HN