Live data from Hacker News

Problems I Have with Python

darkf.github.io

221–230 of 239 posts

Re: Problems I Have with Python

#221

It's definitely not perfect, though ultimately most trade-offs in Python come down to readability. I once went down the rabbit hole (3 library iterations) of overloading operators to enable a very shell and pipe oriented syntax, only to later realize how much harder my 6-month old code was to read even for me. So I've come to appreciate Guido's experience for the trade-off between expressive power and readability. Fo…

Agreed. I came from Perl to Python.

Perl does feel more powerful and expressive, but it often gives you enough rope to hang yourself whereas Python doesn't.

Re: Problems I Have with Python

#222
post #94
post #21

Earlier quoted context omitted.

>lambda is fine, if you're writing in functional style you're using expressions for everything anyway. No, I /really would/ like to be able to write: foo.on_click(lambda: x += 1) The language not supporting this (when most others do) is just silly.

Huh. In perl (and javascript) x += 1 is an expression that returns the new value of x. I guess this is another "simplification" along with the magic scoping model (I want perl's my/ES6's let damnit sulk ) ...

x += 1 should be a statement rather than an expression. It's not just a value, evaluating it has an effect.

Re: Problems I Have with Python

#223
post #118
post #46

Earlier quoted context omitted.

I was taken back by this rather harsh treatment of Python. Is it really realistic to 'have it all'? I'm fully aware that I'd have to go to crazier languages if I want parallelism or speed. For what Python is, it offers me reasonable tradeoffs (mostly slanted towards productivity).. Regarding the FP comments, since it lacks TCO, my take away has always been that Python can only ever become a quasi-functional language.…

I never considered it harsh. If anything, it should be a testament to how nice Python is -- if I /didn't/ like it, I would have a much, much longer list of complaints! People seem to be missing that sentiment -- I do love Python and use it almost daily. This is merely a list of thorns I run into frequently. >Regarding the FP comments, since it lacks TCO, my take away has always been that Python can only ever become a…

But it was harsh. You started the post with

> These are obvious flaws in design, in my opinion, that warrant re-looking at, but to which no real improvements are being made for some reason. (Incompetence? Politics? Both? Who knows.)

You list a number of things which Python ecosystem should do better or differently, and suggest that the reason why these changes aren't getting built as fast as you'd like is people playing politics or incompetence.

Whereas in reality, the two main reasons are that the changes will take lots of effort and time, which the volunteers don't have next to their day jobs (PyPy), or that the developers have different opinions on the ideal language design, and just don't agree with you (heavy functional programming).

"It is my personal subjective opinion that you are incompetent" isn't less harsh than "You are incompetent".

Re: Problems I Have with Python

#224
post #62

I honestly don't get why they made the big compatibility-breaking move to Python 3 without using that opportunity to change things for better performance and no GIL.

this is the essence of the problem for Python's long term future. They've been so burned by the 2-to-3 mess that nobody will ever dare touch the fundamentals again. As you say, some of this stuff (performance, multicore) should have been slotted into 3 since it was breaking-change already, even if delaying it by a few years. Then everybody would have moved, pronto. Now, even if 3 finally snuffs 2 out, we'll be stuck…

Please don't encourage them. I'm fairly certain the CPython core dev team will take almost any suggestion like this as a challenge and break everyone's code again in Python4. They see it as stabbing back at those corporate freeloaders. Or at least that's the public front. I'd just like them to take lessons from Go and actually get unicode right. I'm far more interested in Grumpy. Python2 and Grumpy seems like more of a ace in the hole than Python3.

Re: Problems I Have with Python

#225
post #83

Earlier quoted context omitted.

The core dev having worked on new GIL (py3.2) explained this to me. I never said it was magic. But he said GIL is a tool to achieve thread-safety in python when calling non 'thread safe' code. I am not him, I will not take on any argument of how it works. But since ruby GIL is inspired by python GIL let's hear ruby coders: http://www.rubyinside.com/does-the-gil-make-your-ruby-code-t... Oh, yes, it seems some people a…

> I really think multi-threading is an over-valued and wrong abstraction. That's as wrong-headed as thinking it's the only good abstraction. Each style has its place—it really depends on what the code needs to do.

I'd tend to agree with the parent that multi-pthreading is a poor abstraction but I'd add an important note: only systems programmers should be explicitly spinning up pthreads. Explicit pthreading is a poor abstraction for everyone else. Application programmers are probably operating at the 'wrong' level and greenthreads make more sense.

Re: Problems I Have with Python

#226
post #97

Earlier quoted context omitted.

Another big issue to keep in mind when critiquing Python, as opposed to e.g. JavaScript or Ruby, is that Python is used for so much more besides webdev/etc. stuff. So making changes that improve life for webdevs could suddenly make life worse for people using Python in high energy physics, or in chemical engineering, or in AI research, or a large number of other fields that a webdev might not even know exists. Every…

I would propose there are plenty of better solutions for webdev than Python, and that Pythons should remain focused on where it has been successful.

Apparently people disagree with this sentiment. Allow me to expand on it:

TL;DR - One language for all purposes is the wrong focus.

- Python's success is largely due to things it has done well: Numeric and scientific computing (NumPy, SciPy), system administration scripting (yum, RHEL), workflow management (Luigi, Airflow, Snakemake).

- The idea that one language can be used in all tiers leads to things like JavaScript. Does all things but none of them well.

- PHP and Ruby are already strong in the webdev area, and there is little need for Python to compete here. Resources spent on making Python a top tier webdev language will always be a game of catch up, and distract from its strengths.

- Yes Django is a thing, and should continue to evolve, but its unlikely to catch up to PHP.

Re: Problems I Have with Python

#227
post #206

Earlier quoted context omitted.

I'm pretty sure everybody here can read. We are asserting that your sentence: "These are obvious flaws in design, in my opinion, that warrant re-looking at, but to which no real improvements are being made for some reason. (Incompetence? Politics? Both? Who knows.)" sets a very negative tone and makes your "list of problems" look like a "list of complaints that these incompetent losers should fix asap". In my opinion…

>In my opinion you may just not be the best writer for some reason (Lack of education? Incompetence? Both? Who knows). Then right back at you -- that triggers the same problems as the original statement. :D You could very well have stated your point more constructively with that.

That was exactly my point. I'm glad at least you have some reading compression skills :).

Re: Problems I Have with Python

#228
post #205

Earlier quoted context omitted.

I've read your piece, and unfortunately the overall tone sounds like a rant. I'm sure it wasn't your intent, but tone is hard to convey in a purely textual medium sometimes. I fall victim to this often, and have been actively working to try to avoid excessively negative tone (even if I feel that way). The ranty tone of the piece obscures the rest of the points you were trying to make - many are good, but a strong ton…

Yes, I'm seeing now that the tone of the post is more talked about than the actual contents. Learning!

tyleraldrich wrote to you, to demonstrate you that it's more than a "tone":

"In my opinion you may just not be the best writer for some reason (Lack of education? Incompetence? Both? Who knows)."

Do you consider it to be "just the tone of the post" directed to you?

Post reply on HN