Live data from Hacker News

Drawbacks of Python

quora.com

31–40 of 117 posts

Re: Drawbacks of Python

#31

Earlier quoted context omitted.

I have the same two complaints. I’ve automated some large tasks at my job with Python, and avoided external dependencies because while I’m sure I could deal with it, nobody else here is a programmer and it don’t think it would go well if someone had to try and figure that out later. “Install python (3.6 or later), point script at the csv file” avoids that complexity. It’d be better if it were a self contained executa…

I believe fbs might have massaged some of your GUI packaging problems. I haven't used it myself, but a coworker who builds a Windows GUI application swears by it. From him, "It's the package manager python doesn't deserve" https://build-system.fman.io/

Looks interesting, though the license situation seems less than ideal.

If it's for an internal only tool, does that fit under all the GPL / LGPL requirements?

Re: Drawbacks of Python

#32

I like Python because of zen of python [1]. This fits my brain and had been very helpful. Indeed in 2004 I chose Django instead of Ruby On Rails just because explicit is better than implicit. Overall Python is productive and good. Yes it has some warts and corner case, but than its evident. Among programming language python has a humble community and very approachable. Also most programmer in Python will not hesitate…

I agree with a lot of these things, but actually disagree that Python is good at exemplifying some of them.

For example, semantic whitespace is arguably implicit, hard to read, invites density (compared to an extra line for braces), and (again arguably) is ugly.

Yes, some of these things are subjective, but it's hard for me to confidently recommend Python to someone with these values.

Re: Drawbacks of Python

#33
post #17

Earlier quoted context omitted.

The thing about "just works" in 2.7 is that it does ... until it doesn't, and when it doesn't, it's often way harder to resolve. If you're only using the original ASCII (ordinals 0-127), all is well, and the py3 distinction between strings and bytes seems to get in the way. But as soon as you have a single character in your input or data which is not ASCII, a lot of things stop working and it isn't even clear why, or…

Maybe you're right. Maybe there are applications where this really matters. All I can say is that I have never once had that problem since I started using Python (circa version 2.4). It has always been fine. For example, when dealing with .csv files created with MS Excel, you get strange characters because Excel uses CP1252 encoding, not ASCII. They never tripped up my app in python 2.7. It happily passed them along.…

That's funny as I had the opposite of experience - pulling non-ASCII characters into Python 2.7 caused me trouble - I ended up having to mark everything as Unicode to solve the issues.

Re: Drawbacks of Python

#34
post #8

So this just links to someone's opinion on Python 2 vs 3 instead of an actual discussion on the drawbacks of Python, right?

To be fair, it also highlights a benefit of Python 2.2 over 2.1. (I.e., improvements made in the language eighteen years ago.)

Re: Drawbacks of Python

#35
post #6

I agree with the response that there are a few "gotchas" with python, like with any language! I have gotten caught up with a few type problems when dealing with sending raw binary data over serial and things like that - but luckily python has great unit testing frameworks to help with this. My main beef with python is that it is harder to deploy projects to other people, without them setting up a virtual environment…

All true, but I don't think python's really supposed to be perfect for making desktop apps, its lack of static typing means a large scale app would end up becoming a pain to maintain. That's why it is best used in small teams for data science and scripting; run once and never look back. Most complaints about python IMO fail to appreciate its design philosophy.

Just my $0.02:

I've maintained and/or written more than a few large desktop apps in both python and C++. The python ones are a hell of a lot easier to maintain, i.m.o. Python _is_ strongly typed unlike JS, and I don't feel like the dynamic typing aspects have ever really bit me from a maintenance perspective. At least in my experience, I've seen a lot of either verbose/repetitive or highly cryptic C++ written to in situations that dynamic typing makes straightforward and i.m.o easier to maintain.

To be fair, though, I have a pretty accurate mental model of what python's doing under the hood, and I still regularly find myself mystified by certain C++ language features and what the compiler actually does in slightly ambiguous situations. I've nominally been using C++ longer, but I've used python a lot more frequently. (I'm primarily in scientific computing.)

As a whole, I've always found python to be a nice language from a maintenance perspective, though I'll grant that people have more room to do bizarre things in some circumstances. I've definitely seen some unmaintainable and unreadable python, but I've seen that every bit as frequently in static-typed languages.

I feel that python is quite well-suited to desktop application development. Part of this boils down to Qt being a nice library regardless of whether you're working in C++ or python. However, python codebases tend to be more succinct and readable. In the end, I've consistently found that to be a larger advantage in maintenance than static typing.

Re: Drawbacks of Python

#36

Earlier quoted context omitted.

Python also has a bytes type that’s the same as python 2 strings. Why would you want your strings to not be Unicode?

Obviously nobody cares what I think, so perhaps you would prefer the words of Armin Ronacher, the creator of Flask. http://lucumr.pocoo.org/2014/5/12/everything-about-unicode/

I've been using python for years now, I don't know the last time I had to use `sys.stdin`. I (like most people) deal with `open`, and unicode-only file apis (or the very nice things like flask that mitsuhiko and others have built). For most people, this isn't a problem.

I've migrated literally, 10s of thousands, of files from py2 to 3. I've yet to encounter an issue with surrogateescapes or sys.stdin. Unicode issues yes, but mostly because we were previously being fast-and-loose with unicode vs. bytes, and mishandling, for example, emojis.

Re: Drawbacks of Python

#37

Earlier quoted context omitted.

I believe fbs might have massaged some of your GUI packaging problems. I haven't used it myself, but a coworker who builds a Windows GUI application swears by it. From him, "It's the package manager python doesn't deserve" https://build-system.fman.io/

Looks interesting, though the license situation seems less than ideal. If it's for an internal only tool, does that fit under all the GPL / LGPL requirements?

> If it's for an internal only tool, does that fit under all the GPL / LGPL requirements?

Yes.

Re: Drawbacks of Python

#38
Python is the simplest language I know of that does operator oveloading. If I had to write my pet maths project in c++ I would not even have got started. Sometimes abstract "drawbacks" are irrelevant!

Re: Drawbacks of Python

#39
post #23

Earlier quoted context omitted.

JavaScript is a pretty bad language in my opinion, but does have the universal deployment problem solved a lot better than any other.

JavaScript is the perfect example of give hackers a bit and they'll take a damned terabyte.

JavaScript is like Buckley's cold medicine - It's awful, but it works.

Re: Drawbacks of Python

#40
post #32

I like Python because of zen of python [1]. This fits my brain and had been very helpful. Indeed in 2004 I chose Django instead of Ruby On Rails just because explicit is better than implicit. Overall Python is productive and good. Yes it has some warts and corner case, but than its evident. Among programming language python has a humble community and very approachable. Also most programmer in Python will not hesitate…

I agree with a lot of these things, but actually disagree that Python is good at exemplifying some of them. For example, semantic whitespace is arguably implicit, hard to read, invites density (compared to an extra line for braces), and (again arguably) is ugly. Yes, some of these things are subjective, but it's hard for me to confidently recommend Python to someone with these values.

May be different people have different experience with Python. After c and Perl had been using it for over 15 years and among the languages I have seen Python code is one of the most readable one so far, again subjective as I like sparse and empty spaces in architecture with minimalist design. For me whitespace is same in Python code.

Whitespaces forces programmer to make code readable. Obviously today with tools like gofmt, rustfmt it seems easy and those are inspired by Python.

Python PEP process has been adopted by many programming language. Try JCP process and see what I am talking about.

Post reply on HN