Live data from Hacker News

Python 3 can revive Python

medium.com

111–120 of 242 posts

Re: Python 3 can revive Python

#111
I think double the efforts needed to convert all third party modules more than the amount of developing efforts for Python 3.x.

Since, third party libraries are benched more for Python 3.x migration.

Would we have any possible ways as a community to allocate more resources for ONLY the third party libraries re-implementation? Is it possible to start from scratch for 3.x series? otherwise back porting should be made as standard for 2.x

current scenario,

Loving python ~= amount of third party support.

So, 2.x series never dies.

Re: Python 3 can revive Python

#112

Breaking backwards compatibility is a sure way to kill off a language / alienate a user base. That's a big reason why c++, Linux, PHP, etc. still exist and are used today. Python 3 seems hellbent on taking the Perl 6 approach. How's that working out? Languages should evolve, not break off into new species.

You're either misunderstanding Python 3 or misunderstanding Perl 6.

Python 3 was a few breaking changes made to Python 2.

Perl 6 was a completely new language, designed from scratch, with little in common with Perl 5 aside from bits of syntax. It still doesn't have a "complete" release, in 14 years. In half that time, we've had a Python 3.0 and four more point releases.

Re: Python 3 can revive Python

#113

+1 just for mentioning requests (versus urllib). If someone hasn't tried this library yet, they really should. I replaced tons of libcurl / urllib / ... blocks with simple and legible oneliners. Incredible API!

EDIT: url for those who don't know the library yet: http://docs.python-requests.org/en/latest/ (I am not affiliated, just really impressed)

Re: Python 3 can revive Python

#114
post #25

Earlier quoted context omitted.

You can write pretty functional python, though. There are python compilers like Nuitka (I'm sure there is an llvm frontend somewhere...), mobile is kind of a pickle, yeah, I'd say Django is pretty rails but I always use bottle because I've never needed the kitchen sink before, and the reason its not in the browser is not pythons fault. On that topic, I'd spend a day writing cobol or C++98 if I could get QML + Python…

The main problem with functional programming in python is the bizarre neutered version of its lambdas. It really limits the expressiveness of using anonymous functions in python, as compared to, say, JavaScript. It's by far my biggest complaint with what is otherwise one of my favorite languages.

Don't try to fake anonymous functions in Python. Use its strengths: decorators, generators, etc.

Anonymous functions work well (err, passably) in JavaScript and Perl. They don't really work in Python, and of course you'll just run into pain if you try to force them to.

Perhaps also make some noise about this PEP: http://legacy.python.org/dev/peps/pep-0403/

Re: Python 3 can revive Python

#115
"Nowadays stuff like proper closures, immutability, a good async story, etc, is considered a necessity by discerning hackers." Python has proper closures; I would hope discerning hackers know the difference between a closure and an anonymous function. asyncio is fantastic.

"Remove the GIL." Do you think no one's thought of that before? Remove it how?

"Make it speedy." As you note, that's what PyPy is doing, but this is a hard problem that doesn't have quite the same glamor as JavaScript, so there aren't multiple giants with deep pockets throwing money at it in a race to the top. Maybe throw some cash PyPy's way.

Re: Python 3 can revive Python

#116

At this point, I think python 3 just has a severe branding issue. I bet if you took python 3.4, removed the stuff that will egregiously break things (IE, lack of a print statement and new exception syntax), and just called it python 2.8 everyone would be pretty happy with it. All the same, I'm continuously amazed at the arrogance of the people that maintain the language and set its direction. It's no wonder it's been…

If it were only syntax, 2to3 would be the answer. Exceptions and Print are not the problem. Migrating unicode-aware code and CPython extensions is a much bigger task, and incidentally, much more useful. nonlocal, asyncio, unicode, yield from. If you ask me, these four are very compelling reasons to switch to Python 3 and they solve very real problems.

Those 4 things are really just nice-to-have features though. I can work around all of those with minimal effort (asyncio and unicode), or it just doesn't come up much (yield from and nonlocal)

To me, a compelling feature is a pypy like jit, or fixing the Gil, or lamdas that don't suck. For things like that, I'm willing to break the ecosystem. But for sorta better Unicode? Ha!

Re: Python 3 can revive Python

#117
post #96
post #36

Earlier quoted context omitted.

"People are leaving Python for Go because people have always left Python for fast compiled languages." I think the angst about Go comes from the fact that someone who leaves Python for Java may still come back, because you can develop far more quickly in Python than Java. But someone who leaves Python for Go probably isn't coming back... my experience is that it is slightly slower (10-20%, YMMV but we're certainly no…

I don't know why people are leaving Python for Go when they could be using PyPy or Shedskin. There are plenty of ways to be fast using Python.

Visibility probably. Every whiner blogs "I'm leaving Python for Go" but that was the first time I saw https://code.google.com/p/shedskin/ mentioned.

Re: Python 3 can revive Python

#118
post #76

My perspective is as a researcher in academia. From here Python is far from needing to be revived, it is gaining ground. Also, Python 2 is still king and I suspect will remain popular - researchers rarely have the luxury/incentive to go back and improve it to comply with a language update. A few reasons Python is gaining ground in academia. Firstly, Python is _great_ for teaching undergraduate programming (see [0] fo…

I add that Python is excellent at data representation and transformation. You can easily write some test data and just include it in python, then transform it any way you feel you like to get intelligence out of it. With the standard library you can easily load a CSV file you exported form a data-set and then aggregate and evaluate it with only a few lines of code without much language overhead. Schema-less mixed containers, array operations, dictionaries and sets are incredibly powerful and you can nest them anyway you like. Additionally you can also forget about type limits. Work with numbers as big as you like. That's useful for a lot of things.

Go is good at concurrency and speed. It has some very neat features but it's targeted at a different audience. Data transformations in Go are trickier. You have to do a lot of explicit transformation and that's just not as slick as Python. It really shines with concurrent programming, so I you are writing a server backend for your application and have to decide between C++ or Go, you might very well be compelled to go with Go. (C++ also has it's strength and is healthy as ever with the new standards, just more heavyweight).

Re: Python 3 can revive Python

#119
post #29

Earlier quoted context omitted.

> Python is not dying and if so, Go would not be the reason why It is a death by multiple paper cuts. Go is just one of the cuts. Besides Go (and others have mentioned so I am just repeating them). There is Node.js (Javascript), Rust, Dart, Clojure, Julia, C++11, Java (due to Python never making it far on Android). Not one is enough to eat Python's lunch as they say, but they all are taking a little nibble and soon e…

You could as well say that Ruby is a one trick pony destined to have its lunch eaten by nodejs, or that Go can't stand the competition from Rust as a systems language. It's not easy to predict language evolution, and everything so far points towards python maintaining a healthy evolution rate and a quiet but dedicated user base. I'd say python took the place that would today be Perl's, were it not for the whole Perl…

I'd say people took Python over Perl because of readability, not because of the Perl 6 saga.

Re: Python 3 can revive Python

#120
post #14

> Newer programmers are not that impressed with either version of Python. Any evidence? If it's personal experience, then mine is exactly the opposite. I don't know if such a thing exists, but maybe a big list of the main changes would help convince people more (type annotations, yield from, the forthcoming @ operator). From what I've seen and read, of course all this is somewhere in the docs and release notes, but I…

I agree; I have found that people are super-impressed with Python. Specifically, my experience -- teaching Python to dozens of experienced developers every month, for more than four years -- is that people from the C, C++, C#, and Java world and shocked to the core by the ease with which they can do certain things in Python. Maybe a Ruby or JavaScript developer won't be blown over to the same degree. But there are a…

I agree with you, as a Ruby developer I'm not blown over when I see Python. I shake my head instead and I try to explain why. All those __method__ and all those mandatory (). The : at the end of lines. Can't the parser know when it's over like Ruby does? An else: on a line of itself is a very odd sight. And why must you have built-in functions and methods mixed into the language? Yes len(), I'm looking at you. I won't even enter into the religious war about semantic spaces, because that's a different story.

It might be surprising to many, but Python feels like C to me. Maybe that's why it's popular as a system language. making people feel at home helps. Another reason of its success might be that it is a simpler C so it got many developers coming from C like languages (Java and PHP among the others). As a rubyist I feel as Guido made all sort of wrong decisions while designing Python but as Matz said "I tried to make Ruby perfect for me, but maybe it's not perfect for you. The perfect language for Guido van Rossum is probably Python." So everybody is happy and I think that the news about the demise of Python are greatly exaggerated. It's here to stay for the good and for the bad.

Post reply on HN