Live data from Hacker News

Reasons Python Sucks

hackerfactor.com

541–550 of 554 posts

Re: Reasons Python Sucks

#541
post #394

Earlier quoted context omitted.

I'm pretty sure Python's list type is implemented as a dynamic array, otherwise random access wouldn't work very well. Maybe try to not identify so hard with language choice? That way you gain the capability of processing critique without loosing your marbles.

Why should it matter how lists are implmented?

Because someone claimed that they're not arrays, which they are. So the posted article is correct in that sense; and not wrong about everything, which was also claimed.

Re: Reasons Python Sucks

#542

While I agree with the author's reasons why Python sucks ass, he's wrong about Commodore but thinks that he isn't: "Where's Commodore today? It died out as users abandoned the platform." No. Commodore died because Irving Gould told Tramiel to pack his bags and go when Tramiel told him it wasn't okay to use company's assets like the jet as personal property. Once Tramiel was fired, the company was plagued by chaos and…

He gets so much wrong in that paragraph:

> Commodore created one of the first home computers (long before the IBM PC or Apple).

Commodore, Apple and Radio Shack all released home computers in 1977. Six months is hardly “long before”.

> But the Commodore PET wasn't compatible with the subsequent Commodore CBM computer.

He must mean the CBM-II, because the original Commodore CBM machines were just rebranded PETs.

Re: Reasons Python Sucks

#543
post #168

Earlier quoted context omitted.

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.

They probably copy and pasted decade+ old code floating around that was written before Php wised up about security.

Re: Reasons Python Sucks

#544

Earlier quoted context omitted.

>3 (syntax) seems to be about not supporting the author's own highly idiosyncratic habits Yeah, I don't get the author at all. Using indentation is so, so, so, so, much cleaner and easier to understand, even with lots of nesting than trying to figure out if you closed all the stupid curly braces, curly braces be damned.

I asked a "C all the things!" developer a while back why he hated Python's enforced indentation and in a whole lot of words he basically said that it makes it difficult to visually track scope when you have long chains of conditionals. The standard Python developer response to that is, "Aha! You like braces because they enable your bad programming practices !" However, I found the best way to illustrate that point is…

>"If you're never allowed to use a text editor/IDE that highlights braces or the space between them ever again would you still prefer braces to indentation?"

Yes. (Though that's hardly the worst thing about Python.)

Re: Reasons Python Sucks

#545

People hate on spacing, but people rarely talk about the benefits that specific spacing has. Yeah, sure, you can complain about how strict it might be, and complain about how it can cause bugs when something is mis-indented. But it's not like brace-languages are perfect either. How about people who mix tabs & spaces within a single line because of lack of discipline or maybe a mistake from refactoring code? Imagine t…

The more serious issue with significant white space is that it makes writing code formatting tools like Prettier impossible. That’s too much to give up to avoid having to write an extra brace or two IMO.

heard of black?

Re: Reasons Python Sucks

#546
post #543

Earlier quoted context omitted.

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.

They probably copy and pasted decade+ old code floating around that was written before Php wised up about security.

It doesn't matter that PHP has wised up about security; I've seen modern PHP too, the language is still a mess and encourages bad practices and bad engineering.

Re: Reasons Python Sucks

#547
post #543

Earlier quoted context omitted.

They probably copy and pasted decade+ old code floating around that was written before Php wised up about security.

It doesn't matter that PHP has wised up about security; I've seen modern PHP too, the language is still a mess and encourages bad practices and bad engineering.

Top 3 examples?

Re: Reasons Python Sucks

#548
post #296

Earlier quoted context omitted.

Here are pictures that explain the difference between variables as named boxes and names in Python https://david.goodger.org/projects/pycon/2007/idiomatic/hand...

That's a nice explanation for BASIC programmers, but for anyone who has ever programmed in some other programming language than BASIC, it should not come as a surprise that named boxes can store pointer values. As they do in Python. They literally store C pointers of type (PyObject *).

Python is not C. There are no pointers in Python.

I have no idea why would you mention BASIC here.

Re: Reasons Python Sucks

#549
post #427

Earlier quoted context omitted.

> 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.

Pip was not part of Python by default for a long time.

Right.

A post on my blog:

pip now installed with Python 2.7.9:

https://jugad2.blogspot.com/2015/03/pip-now-installed-with-p...

which mentions:

https://docs.python.org/2.7//installing/index.html

and::

https://pip.pypa.io/en/latest/installing/#pip-included-with-...

I've used Python versions before that, where you had to install pip separately, and it was not trivial (to find it / install it), although not very difficult either.

Re: Reasons Python Sucks

#550

Earlier quoted context omitted.

x = lambda y: def x(y): What's so heavyweight? A new line and a tab?

IMO lambdas are useful because they reduce mental overhead by allowing the developer not to give names to trivial functions [1]. Compare these two equivalent pieces of code: youngest_person = min(people, key=lambda x: x.age) def get_age(x): return x.age youngest_person = min(people, key=get_age) This may not seem like a huge difference, but using lambdas scales better. [1] Incidentally, this is the same reason why I…

Yeah in the context of multi line functions the overhead is

A new line A tab A return

This does not sound heavyweight to me (in that context). In the context of a single line function I see the utility of lambdas.

Post reply on HN