5 ms·
> Python 2 vs. Python 3 is a complete and utter mess. Besides being off topic and adding no value to this thread, for those of us who made the transition to Py
by cname 11y ago
> Python 2 vs. Python 3 is a complete and utter mess.
Besides being off topic and adding no value to this thread, for those of us who made the transition to Python 3 with minimal fuss, this is just pure hyperbole. I really wish people would quit grinding their Python 2/3 axes.
- nickysielicki 11y agoAre you joking? Off topic? He made a comment about perl doing a poor version transition, and perl was largely replaced by python which also did a language transition. It makes complete sense to bring up python2 -> python3. I also made the transition to `#!/usr/bin/env python3` fairly smoothly. That doesn't mean that the majority of the community did. Python3 came out in 2008, next week will be seven years of it being out. Yet `#!/usr/bin/env python` still defaults to python2[1]. That's not quite the expected 5 years of transition that they hoped for. At year 5 it looked like this [2]. [1]: http://legacy.python.org/dev/peps/pep-0394/ http://legacy.python.org/dev/peps/pep-0394/ [2]: https://web.archive.org/web/20131204094939/http://python3wos.appspot.com/ https://web.archive.org/web/20131204094939/http://python3wos...
- kbenson 11y agoOn the short list of places where even those tired of hearing about Python migration problems have to admit the discussion is relevant, I have to imagine the Perl 5 to Perl 6 discussion qualifies.
- hahainternet 11y agoI've no idea why you were downvoted. Python is indeed going through an almost identical transition, except that 3 does not fix as much as 6.
- Scarblac 11y agoPython 3 fixes a few things, mostly in Unicode handling. What I've seen of Perl 6 looks like a new language. The main "problem" of the Python transition is the fact that Python 2.7 is so good.
- hahainternet 11y agoPerl6 is absolutely a new language. Perl 5 had so many structural problems it was deemed unlikely they'd be solved. Since then however lots of hard work has been done on every side. The biggest problem about Python is not the superiority of 2.7, it's the hubris of the Python community to think that 2.7 is actually that great. I would send any Python programmer on a course of writing Golang and Perl 6 and I would put money on the line they would come out a better programmer. That's what I feel happened to me to some extent.
- Scarblac 11y agoI mean good compared to Python 3 -- for years, all I heard was "what is so much better in Python 3 that I should switch?". Comparing against other languages usually isn't all that relevant as no company is going to move over all their code. Since a year or so, everybody is moving to Python 3. And for the last years, we've had the bliss of a stable programming language. So much in open source constantly brings out new versions that you have to keep your stuff compatible with all the time.
- jonesb6 11y agoYour last part is spot on for me. Writing Golang indeed made me a better Python programmer.
- effie 11y agoThat sounds interesting. Could you share some details? Which parts of Golang reveal so much about Python? I'm using Python and I'm thinking about getting more into some compiled languages of similar expressivity like Nim or Go.
- jonesb6 11y agoWhen you have to implement things in a "large" language after writing a similar one in Go you'll find yourself coding with a very minimalistic set of objectives. It's a Go-flavored pythonism of sorts. Things like explicit error handling, concurrency, maybe even memory management, will make their way deeper into your work flow and thought processes then they did before, especially if the language you are now using doesn't emphasize them to begin with. It's this reason why I think learning as many languages as possible is a good thing. I can't imagine what'd I'd be missing out on if I was stuck programming Java 6 for a decade.
- doktrin 11y ago> except that 3 does not fix as much as 6 On the logical flipside, 3 also doesn't alter nearly as much as 6. It was intended (and largely functions) as an iteration - not a backwards incompatible re-write. It's not an irrelevant comparison, but I feel like it's an overstated one.
- hahainternet 11y agoYou're not wrong, but what I'm trying to hilight is that this transition to a compatible iteration is still ongoing nearly a decade later.
- dheera 11y agopython will always point to version 2 because version 2 syntax and version 3 syntax are mutually incompatible; one is not a subset of the other. Making python suddenly point to version 3 would break a huge number of scripts already out there, including numerous setup and configure scripts.
- takeda 11y agoI have yet to write a code where I was unable to make it work on both py2 and py3.
- kbenson 11y agoI remember Python 1 and Python 2 having this problem, it was done before, so it's not impossible it would be done again.
- dheera 11y agoMaybe. But those were the early stages of the language. Python 2 has huge amounts of industrial-scale deployment that many people would prefer not to break. There are also numerous systems in deployment that need to have 2 and 3 running simultaneously on the same machine.
- kbenson 11y ago> There are also numerous systems in deployment that need to have 2 and 3 running simultaneously on the same machine. There were numerous systems that needed both 1 and 2 in the Redhat ecosystem. I agree it likely won't happen again, but mostly because the Linux distros have likely learned their lesson. It's the package managers and Linux distros with included system functionality written in some version of Python which have the ultimate say, and there are much better solutions for the problem now than when Python 2 came out. That said, it's possible some distro will make /usr/bin/python be Python 3 and /usr/bin/python2 be Python 2, if they haven't already. Weirder stuff happens all the time.
- 11y ago