Live data from Hacker News

Reasons Python Sucks

hackerfactor.com

461–470 of 554 posts

Re: Reasons Python Sucks

#461
post #168

I tend to agree with the author (although not with a few of his specific reasons) that Python is terrible. Everywhere I've ever been that used Python they've claimed it was to make development faster, but mostly we just fought with bugs that cropped up around tests that were too aggressively mocked and weren't testing things, or stuff that somehow was in the wrong scope because someones editor was using the wrong typ…

Re: There is no situation in which PHP is the appropriate tool for the job... While clunky as a language, PHP's "environment" is better if you are doing web apps. Easier to install, including a test setup, more web-oriented libraries and functions, and a built-in HTML templating language for "view" pages (per MVC). If your stack is designed right, you'll be spending most your time plugging in parameters to API's such…

If you're doing web dev it just makes it easier to write crap. I am also utterly sick of pentesting every garbage website written in PHP and finding dozens of easily avoidable bugs that always boil down to PHP being terrible at what it does. It may be easy to use, but that's no excuse to use it and write bad software.

Re: Reasons Python Sucks

#462
post #228

Earlier quoted context omitted.

Edit: Also fuck this whole "it's so cool to shit on Java" thing. Grow up. You aren't in college anymore. You should recognize that Java fills its niche effectively, and does a decent job of being semi-fast, portable, easy to read and maintain, and safe. The "it's so cool to shit on Java" thing served an important purpose and is probably close to being retired, but it's easy not to understand if you weren't a Java pro…

> The "it's so cool to shit on Java" thing served an important purpose and is probably close to being retired I don't know in which world you live in, but in the real world Java is by far the dominant platform for web services.

And JavaScript is probably the most written in language in the world... doesn't mean it's great. Though, it is good enough for most things.

I always liked C# better than Java though.

Re: Reasons Python Sucks

#463

Earlier quoted context omitted.

Yes, we indent code for readability sake. If you don't, that would be incompetent. Which makes the braces redundant at best, noise at worst. Their lack in Python bothered me too, one afternoon in the spring of 2001, then I moved on. When I hear someone complaining about it I immediately think, this person hasn't much experience with Python, or is one of those highly inflexible pedant types.

>Which makes the braces redundant at best, noise at worst. YES!! Every time I try something other than Python that requires braces, I am like "WTF, why do I have to type this extra shit! Such an annoyance."

Arguably the lisp family contains the “huggiest” use of characters, but something like Paredit turns those parentheses into something of a turbo-charged way of handling code forms.

But it leads to another problem: hatred of typing commas in non-lisps.

Re: Reasons Python Sucks

#464
post #460

Earlier quoted context omitted.

In other words, the latter means "set aside one pointer's worth of storage and fill it with the bit pattern for the pointer pointing to the value 17 (which you may have to create first)". Variables have values. In C those values may be ints, floats, pointers, whatnot. In Python (at the implementation level) those values are pointers to objects.

> In other words, the latter means "set aside one pointer's worth of storage Set aside one pointer's worth of storage on the heap , yes; not on the stack or in the program's data segment, which is what the C statement I gave does. > and fill it with the bit pattern for the pointer pointing to the value 17 (which you may have to create first)" Which has no analogue whatever in the C version. Also, you completely left…

> not on the stack

Except for locals. (Well, OK, the Python stack is reified in the heap, but local variables are translated into small integer indices into the stack frame.)

> an entry in the namespace dictionary

Except for locals, which do not involve memory allocations or dictionary lookups.

Anyway, we're getting farther and farther away from the topic, which was that Python argument passing is no different from any other language in which everything is an object.

Re: Reasons Python Sucks

#465

Most of the points in this article fall on a continuum between irrelevant to dead wrong. 1 (versions) and 2 (installation) have to do with the ecosystem, not the language. Unsigned packages are a real problem, but hating on community-maintained software is just weird. Most software in your local Linux distro's repository is maintained by a "community" that might just be one person working in their spare time. 3 (synt…

7 Isn't Python actually pass-by-value / pass-pointer-to-object-by-value like Java is? Many confuse pass-pointer-to-object-by-value with pass-by-reference, but they are different things. Pass-by-reference allows to write a procedure that swaps two external values.

ditto

Re: Reasons Python Sucks

#466
I can only agree to his hate of spaces. I personally hate space based languages. It only brings annoying problems and you have to care for things (spaces/tabs) that you shouldn't have to care about in the first place. {}'s -> Love.

Re: Reasons Python Sucks

#467
post #427
post #390

Earlier quoted context omitted.

> This was not by accident - Guido and others have always had the utmost care for good developer experience out of the box. How many languages pack an editor ready to go? Or a way to install modules with a single command? Not even Java, with all its commercial might, ever achieved that - it barely got a REPL last year, which Python has had for what, 20 years now? The Java module experience is miles ahead of the Pytho…

> and that's it, you're done You are seriously comparing Maven, a huge and over-complicated xml-based system that is not even installed by default and that people hate so much that there are umpteen alternatives (gradle etc), with `pip install -r requirements.txt` that works out of the box? I just can't even... > Python still doesn't have anything [like Maven] And I thank the Gods for that.

I do not see your comment as fair to the parent:

> there are umpteen alternatives (gradle etc)

there was ant (build tool) then came maven which is much more flexible and contains dependency management capabilities (and _is loved_ by many) nothing to add that the parent did not already say. Then came gradle which has faster build speed and features like incremental builds and a Groovy based configuration.

pip did not ship with python for a long time, and has problems of its own.

Re: Reasons Python Sucks

#468
import numpy as n

seriously? the community norm is:

import numpy as np

and because its a norm, nobody is confused. But the author certainly is.

the whole list of complaints basically exposes his basic lack of familiarity with the language.

Re: Reasons Python Sucks

#469
post #59

A better reason to hate Python: the internal model is way overcomplicated for what it's meant to be: a beginner-friendly scripting language. "Everything-is-an-object", duck typing, decorators, bizarre scoping rules, etc., all make it difficult for experienced programmers to understand, let along beginners. I've always thought there's a much simpler language struggling to get out of Python, and I wish it would and wou…

Is python really meant to be a beginner-friendly language? I tend to think of it as lisp-without-parens, and lisp is not very beginner friendly.

I think most beginners learn languages to solve some particular thing. Python has a lot of great libraries and tutorials for learning. It doesn’t matter if Python has a lot of idiosyncrasies—new Pythonistas are copy/pasting and mad-libbing their way to a basic understanding of coding.

Learning to program from first principles is hard, but I reckon Racket, a lisp, with it’s wealth of teaching materials and well thought out design is about as good a way to start as any. It’s small and consistent enough to actually learn from the ground up rather than by pulling on one thread.

Re: Reasons Python Sucks

#470
post #460

Earlier quoted context omitted.

> In other words, the latter means "set aside one pointer's worth of storage Set aside one pointer's worth of storage on the heap , yes; not on the stack or in the program's data segment, which is what the C statement I gave does. > and fill it with the bit pattern for the pointer pointing to the value 17 (which you may have to create first)" Which has no analogue whatever in the C version. Also, you completely left…

> not on the stack Except for locals. (Well, OK, the Python stack is reified in the heap, but local variables are translated into small integer indices into the stack frame.) > an entry in the namespace dictionary Except for locals, which do not involve memory allocations or dictionary lookups. Anyway, we're getting farther and farther away from the topic, which was that Python argument passing is no different from a…

> Except for locals.

I meant the C stack, not the Python stack. At the C level all Python objects are allocated on the heap (except for some of the singletons like None which are statically allocated by the interpreter). (The fact that I used the term "heap" indicates that I was talking about the C level, since there is no "heap" at the Python level.)

> Python argument passing is no different from any other language in which everything is an object.

I disagree, since again you have left out the namespace binding step completely.

Post reply on HN