Live data from Hacker News

Reasons Python Sucks

hackerfactor.com

1–10 of 554 posts

Re: Reasons Python Sucks

#2
All this hate is justified, but not the conclusion.

The libraries available in Python, for everything touching data / scripting are just so powerful and well thought, that for many small projects, using Python is a no-brainer. The best thing is that those libraries are actually incredibly fast, while Python is supposedly slow.

Re: Reasons Python Sucks

#3
A number of these points seem like reasonable opinions to have. But two which had me questioning the breadth of the author's experience were "Most programming languages pass function parameters by value." and "In every other language, arrays are called 'arrays'. In Python, they are called 'lists'."

To the author:

1. Java, JavaScript and C# all have types which are passed by reference. (They also have types which are passed by value.)

2. Python lists are not arrays, if by arrays you mean a C- or FORTRAN-style block of non-resizable memory which is indexed by position. Python lists are much more like the Java List or C# IList interface.

Re: Reasons Python Sucks

#5
Interesting points. I disagree with Reason 2 though. Python has smoother installation than Java and GCC.

One of the reasons Python is popular is because it's easy to do a lot of things. Some python choices don't make sense technically, but they were made to make python as easy as possible. Performance was never the first criteria of Python (or ruby). My personal peeve is with mandatory indentation. But again, that's the idiom the language has adopted.

Re: Reasons Python Sucks

#6
Many of the reasons authors states are quite silly. Personally I don’t like the huge perf hits everywhere you look. For example, a bool in Python takes whopping 24 bytes! Multi threading is a giant mess due to GIL that apparently no one can get rid of. Things like true static variables are missing. Import behavior differences for programs and modules is baffling. Lambda is intentionally kept under powered (ex. no group by). Need to create new environments to avoid conflicting package versions can quickly become annoying (could have been improved by side by side versions).

Still, I don’t hate it at all. It’s good and beautiful for lot of other stuff.

Re: Reasons Python Sucks

#7
the self argument for methods/method calls is stressful (having to define self for methods and having to call a method via self); also the fact that you need to check if dictionary key exists, else you get an exception when trying to get the keys value. Also ':' at the end of each line.

I always forget at least one of these. You didn't have any of these goodies in good old perl (sob, sob)

(wow, this one got flagged pretty quickly, wonder why)

Re: Reasons Python Sucks

#8
> Here I am hating on the language I love, but I remember when I would have to review this question on StackOverflow every time I wanted to create a new virtual environment:

> https://stackoverflow.com/questions/41573587/what-is-the-dif... What a mess.

Came here to post something similar, but a commenter on the blog post itself got to it first. Virtual environments never made sense to me.

Re: Reasons Python Sucks

#10

A number of these points seem like reasonable opinions to have. But two which had me questioning the breadth of the author's experience were "Most programming languages pass function parameters by value." and "In every other language, arrays are called 'arrays'. In Python, they are called 'lists'." To the author: 1. Java, JavaScript and C# all have types which are passed by reference. (They also have types which are…

And python does have arrays in the array module.
Post reply on HN