Live data from Hacker News

Extend Python 2.7 life till 2020

hg.python.org

211–220 of 286 posts

Re: Extend Python 2.7 life till 2020

#211

Earlier quoted context omitted.

Try ANSI C then!

I heard Pascal is all the rage nowadays Or a good, supported, still used and very stable language: Fortran.

Yeah. Actually, sarcasm aside, there's nothing wrong about using those languages at all.

The only pain point is Pascal's lack of a nice-sized community (and thus libraries, support for modern systems etc) nowadays.

Re: Extend Python 2.7 life till 2020

#212
post #34

Earlier quoted context omitted.

On the other hand, if you are comfortable with Python 2, it will do the job, and you know it will be supported for a foreseeable future, why bother learning Python 3? I assume there is a good answer for switching to Python 3, but I honestly don't know (haven't bothered to do any research though). Harshly put: I care about getting my python script working as soon as possible and for a foreseeable future - I couldn't c…

" why bother learning Python 3?" Unicode And of course, you'll move from a platform that's shutting down to one that's evolving Really, it's worth it.

Unicode works perfectly fine on 2.x.

Re: Extend Python 2.7 life till 2020

#213
post #177
post #29

Earlier quoted context omitted.

There is a port in the works [0], and apparently they decided to go with a rewrite instead of just a port. I'm not sure of the exact reasoning, but that could explain why it takes them time. [0] https://github.com/boto/boto3

There has certainly not been a lack of work on porting, there was the neo branch as well, there is some interesting (for some values of interesting) discussion about the approaches to 2.x and 3.x compatibility: https://github.com/boto/boto/issues/1127 and also the py3kport branch: https://github.com/boto/boto/tree/py3kport/py3kport

I don't know all the backstory, but when I pip-installed awscli in a py3.4 virtualenv this week, it pulled in "botocore", among others. Everything seems to work fine, so at least botocore works on version 3. Since awscli is a very complete AWS interface, it may be just a matter of documentation or a very thin API layer before everything one needs in boto works fine on v3.

Re: Extend Python 2.7 life till 2020

#214
post #119
post #106

Since there still won't be a Python 2.8, I read this as the mainstream Python not evolving one bit for the next 6 years. For me, this would be grounds for moving to a different language.

Groovy, Guile and Clojure.

Guile? Really?

Re: Extend Python 2.7 life till 2020

#215
post #119
post #106

Since there still won't be a Python 2.8, I read this as the mainstream Python not evolving one bit for the next 6 years. For me, this would be grounds for moving to a different language.

Groovy, Guile and Clojure.

> not evolving one bit for the next 6 years [...] would be grounds for moving to a different language

I'd never heard of Guile until you mentioned it. I looks like Scheme. If moving to a lisp-like language, Clojure, which you mention, would be a better choice. It's backers claim they'll be there for the long-term, and it has innovative concurrency constructs.

As for Groovy, it appears to be dying. Oracle went to a lot of trouble to create Nashorn, a zippy Javascript bundled with Java 8, and you can bet they'll be promoting it heavily in the "scripting Java" space to dislodge Groovy. Grails is losing adoption bigtime, getting replaced by Node.js, Play!, Django, and even Rails. When Gradle upgrades to version 2, they'll likely bundle some other JVM languages for their API, e.g. Nashorn.

Re: Extend Python 2.7 life till 2020

#216

Earlier quoted context omitted.

Python3's treatment of integer literals in that case is bad. The first is the behavior that someone used to programming will expect by default, since those are integers. If you want non-integer operations you should have to use a decimal point in the 1 or 2.

I disagree. A strong type system is good, but in this case pragmatism wins the battle. I personally have been bitten innumerous times by bugs where division was rounded down (usually to 0, which is especially destructive). Most of the numbers I encounter start as integers and most of the calculations I need are floating-point. This language behavior saves me from sprinkling "* 1.0" everywhere on my code, or from intr…

I just think it's nuts that we're upcasting ints to floats implicitly. Explicitness over implicitness is one of Python's guidelines.

Re: Extend Python 2.7 life till 2020

#217

This is the path that all dynamically typed scripting languages must follow. Over time, change becomes impossible because the lack of typechecking or static analysis tools means that any change might break something in a subtle and hard-to-diagnose way. And so the language grows by accretion. You end up with something like bash or perl, where there are a million ways to do any one thing. Each way was added at a parti…

As much as I'm drawn to languages such as Go that are designed for ahead-of-time compilation to self-contained executables, I don't buy your claim that dynamic languages are particularly susceptible to degeneration. As others have pointed out, Java and C++ are both statically typed, and they've both accumulated considerable cruft over the decades. Go is cleaner primarily because it's newer.

Re: Extend Python 2.7 life till 2020

#218
post #76

Earlier quoted context omitted.

> The Ruby community seems much less fragmented and wants to see the language move forward. It helps a lot that the 800 pound gorilla, Rails, keeps up with Ruby releases. You kind of answer your question you know, the reason why Python is so fragmented wrt Ruby is precisely because it has a much larger number of uses case: scientific (numpy/scipy/panda), sysadmin, web (django, bottle, ...), games (Ren'Py, ...), etc.…

> Ruby on the other hand is pretty much just Rails[1] Puppet and chef say hi.

Well there is a HN front page story just now about Puppet moving to Clojure ;).

(And Chef is part Erlang...)

That being said, my point wasn't that there are no software outside of Rails, that would have been quite a claim, but rather than Ruby is much more defined by Rails than Python is defined by Django, which is why migration which alway be much more difficult on this side of the animal kingdom.

Re: Extend Python 2.7 life till 2020

#219

Earlier quoted context omitted.

Where exactly do you get this "tens of thousands" number from?

From the number of Python programmers out there and the percentage using Python 2. In fact there'd be "tens of thousands" websites made with Python alone (Django et al), so the number of apps in total will be much higher. Heck, people doing scientific Python are more than 10.000, and they write more than one new apps for their research every year.

Oh, I see. Some people here misinterpreted what I wrote to suggest that Python isn't widely used. Clearly that's not what I meant.

I just dislike how melling basically pulled a number out of his ass, and then used it as "evidence" to back up his claims. I wouldn't even consider it a low-quality estimate, since he doesn't even try to justify or explain how that number was obtained.

In this case, "tens of thousands" could very well really be "hundreds of thousands". It could be significantly less, too. Regardless, it's purely speculative. Using such made up numbers makes his argument weaker than perhaps not using any such value at all.

Re: Extend Python 2.7 life till 2020

#220
post #180

Earlier quoted context omitted.

On both OSX and many Linux distros, Py 2 comes pre-installed but Py 3 does not. If I'm going to write simple scripts that I'm going to give out to people, it's nice not having to worry about them needing to fuck around to get the script to run.

> On both OSX and many Linux distros, Py 2 comes pre-installed but Py 3 does not. Because python 3 was not the most stable at the time of distribution of that operating system. Why would I the developer of said operating system release anything but the most stable versions of the language? This would in turn make my operating system at times less stable.

I totally agree. However, until Py3 is packaged standard it's always going to be easier to run Py2 code. For example, I have a friend who does data analysis on OSX and occasionally she gets data in a format that is ugly. I take a look at it and send her a python script that will massage it into something nice.

She's ok with the occasional "sudo pip install ..." to get a library, but if my instructions started with "ok, first install Xcode and then install homebrew" the answer would probably be "it's ok I'll just do it by hand"

Post reply on HN