Live data from Hacker News

Reasons Python Sucks

hackerfactor.com

351–360 of 554 posts

Re: Reasons Python Sucks

#351

Earlier quoted context omitted.

It's not a beginner language, but it is beginner-friendly. It's actually a huge problem if you end up trying to hire people to build enterprise software in Python, because everyone and their mother has "5 years of Python experience", but "scripting on your own" is miles apart from "building well designed systems".

What would you consider a beginner language then?

Pascal was designed for teaching.

Re: Reasons Python Sucks

#352

Earlier quoted context omitted.

> And I pity anyone who miscounts spaces and accidentally puts in three spaces instead of four somewhere -- this can take hours to debug and track down. this is so hilariously wrong that it is clear that the author has never actually tried any of the things he complains about. Python 3.7.1 (default, Oct 22 2018, 10:41:28) [GCC 8.2.1 20180831] on linux Type "help", "copyright", "credits" or "license" for more informat…

I think the problem he is describing--somewhat poorly--is when the "third space" just happens to match some other scope above, and therefore is syntactically valid, but not nested the way one initially thought. Those kinds of problems can be hard to track down.

Never searched for 'hours' but it's been a annoyance before, usually related to copy/pasting. I certainly have run into the indent issue where my editor doesn't know what block it should be in but that's more emacs fault.

That said, I sure with python offered a totally optional end block thing. In many situations it would make things far more clear.

Re: Reasons Python Sucks

#353

For me, the siren call of Python was the supposed "elegance" (executable pseudo code!). But then you have these horrible non-composing list comprehensions (compared to say Ruby where the chain just flows from left to right instead of getting more and more nested), and that god awful "self" and "__init__" cruft. It just seems like a poorly designed (and/or evolved?) language. It'd be nice if something else would carry…

It's such an odd mix of elegance and completely half-assed botched up language design isn't it? It always feels to me like one of those movies where they ran out of budget half way through and hastily pasted together the rest of the script.

Re: Reasons Python Sucks

#354

One of my biggest gripe is how python have a hidden non-declared agenda to have syntax as far from C as possible. its really not giving language any usage benefits when you cannot use ternary expressions, ! as not, !=, increment operators. Also, PEP8 is very very presriptive, you are disallowed to do violate any rule, even when if you need to to make the code better. (I feel shunned by the community for not liking 80…

IIt limits the ability of python to reap the benefits of better hardware

GIL sucks conceptually but I don't think it's massively limiting in terms of future hardware. E. G. I just discovered you can throw a bit of python into colab and do ML on Google provided K80 GPUs for free.

Two completely different things I know but to me that is a better indication of future proofness in a way.

Re: Reasons Python Sucks

#355
post #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 gro…

Even if you despise python to the core, it's hard to shrug off the massive number of well documented, mature libraries. Usually there are 2 or more choices with at least one of them being fairly mature and maintained. Not to mention the wealth of examples showing how you can do something.

So despite all the things I dislike about python, it's still my go to for a proof of concept or getting something done quickly.

Re: Reasons Python Sucks

#356

Earlier quoted context omitted.

It is usually the "first language" of choice these days, when teaching programming.

This has more to do with who has what teaching resources pre-made to sell than something any thought about the merits of a programming language.

Sort of. Maybe. When python was gaining momentum in university settings though, the one main argument I read from a professor more than a decade ago, is that the python implementation was near identical to their pseudocode. So they stopped using whatever language they were using in their textbooks, and started using python, since it made it easier to convey the knowledge they were trying to convey (and probably greatly decreased the amount of editing and typos).

Basically, don't discount a text book where every algorithm is executable code, without first having to translate it into some other language.

Re: Reasons Python Sucks

#357
post #176

Earlier quoted context omitted.

It was though https://www.artima.com/intv/pyscale.html "So I never intended Python to be the primary language for programmers, although it has become the primary language for many Python users. It was intended to be a second language for people who were already experienced programmers, as some of the early design choices reflect. On the other hand, intuitively I probably stuck to many of ABC's design principles. Beca…

The very quote you linked explicitly contradicts you... "It was intended to be a second language for people who were already experienced programmers, as some of the early design choices reflect. "

[deleted]

Re: Reasons Python Sucks

#358
post #264

Earlier quoted context omitted.

> Java primitives (short, float, double, etc...) are copied to the calling function, but arrays and objects are passed by reference. Not really. "Pass by reference" is a specific term for a much different technique which is very rarely encountered these days. It means that if you pass a variable "foo" to a function, that function can assign "foo" to some other value and the value of "foo" will also be changed outside…

> "Pass by reference" is a specific term for a much different technique which is very rarely encountered these days. C++ isn't all that rare. I suspect we'll have to agree to disagree whether your definition of pass by reference is universal. Given your definition, can you name any language with calling semantics which are not pass-by-value? I mean, you're always passing the value of something (be it the actual value…

Popular as it is, C++ is still a pretty special case. Not many languages have references like it. (I personally don’t use any.)

  int a = 5;
  int& b = a;
  b = 6;
  // a is now 6
Allowing an lvalue argument to be changed by a function call is something more languages support, though, like C# and VB.NET. That’s what it means to “pass by reference”. Passing a reference/pointer is an accurate description of how most languages work, which might sound similar, but is really different enough to warrant not being called that. Especially because the behaviour has nothing to do with passing: variables just work that way in general in Python, Java, JavaScript, Ruby, C#, VB.NET, Lua, ….

Anyway, back to:

> I may be missing something, but I can't find any example in my mind which indicates difference between passing in Java and Python.

You’re right that C extensions can break the rules, but in the real world they don’t (because that breaks everything); immutable int objects are effectively primitives. (Modern JavaScript – in strict mode – is an example of a language that hides the implementation details of primitives better than Java.)

Re: Reasons Python Sucks

#359
Python: something you can't see causes significant change in program behavior.

Go: Something you see ends up as a compiler error.

Oft heard is the bellyaching cries of the proponents that try to conflate these two things, but they are not the same thing. One results in bugs, the other can be bypassed. Most languages opt for the second. (With Java for instance, most shops have a checkstyle gate in their build process).

Re: Reasons Python Sucks

#360
post #46

I agree with the OPs points but disagree with the degree to which the author has used them as a means to "hate" a language. I generally avoid Python too but saying you hate the language because of a bunch of contrivances mostly wrought from inexperience and holding too strongly to C like languages is poor form. Versions: Ok? Versioning and fragmentation is a hard problem. Backwards compatibility is a hard problem. Mo…

> Also, lots of people still use Perl. Lots of people still love Perl. I don't know why.

Perl still holds a special place in my heart. It's so forgiving that it's perfect for banging out something that gets the job done in a couple minutes but while I most often use it for something quick and dirty you can still put in some time and planning to write something complex and maintainable too.

I'm not sure there are major projects being written in perl today, but it's the language I still use for automation of day to day admin stuff and for pretty much all of my log/mail parsing needs.

Post reply on HN