Hacker News new | ask | show | jobs
by berberous 4445 days ago
I chose to learn Ruby in part because of the confusing Python 2/3 issue. I recognize that this is a largely stupid reason to choose a language, but when lots of people suggest that either language is great to pick-up, well, it was another easy reason to lean Ruby over Python.
4 comments

I don't agree at all that it's stupid (and I'm someone who'd generally pick Python over Ruby). Fragmentation sucks. Really bad fragmentation sucks more. Python's fragmentation is pretty bad.
It's funny reading this from the Zen of Python "There should be one-- and preferably only one --obvious way to do it." [1] while seeing that there are nearly two independent language/ecosystems with the name Python (namely version 2/3).

[1] http://legacy.python.org/dev/peps/pep-0020/

Having a split like that in a language is terrible. You find libraries that work with not-your-version and you envy features that would make your code cleaner/faster/better, but you can't use them.

- "Ugh, that thing is lacking/stupid/messy."

- "Oh, no problem, that wart has been fixed in Python 3"

- "Can we use it?"

- "No."

As a Python developer, usually this isn't a major problem for me when going out and finding libraries. Almost every library you find will support 2.7, so I pretty much stick to 2.7 when using or writing any code. I miss some of Python 3's good features but the library ecosystem is more important to me.

It's a real pain in the ass when I try to publish my own, though. The generally accepted rule is that all libraries must support 2.6 through 3.4, and this can be a major hassle.

But you can use Python 3, it is your business if you decide you don't want to.
Not stupid at all. The same concerns and some bad experiences with 2/3 conflicts and deployment issues drove me to Go after investing quite a bit of time with Python, and I've not regretted it yet.

I'm not sure if it was something I did but I also occasionally found that when pip'ing Python 3 libraries with a lot of dependencies, occasionally some of them would actually be Python 2 libraries and things would break.

Hear, hear.