Live data from Hacker News

The Python Paradox (2004)

paulgraham.com

211–220 of 275 posts

Re: The Python Paradox (2004)

#211
post #168

Earlier quoted context omitted.

There is no point in statically typed Python, it's useless. Just a lot of people from other programming languages coming in and trying to make the language more familiar to them.

I moved from python2 to python3 to typed python3. It makes refactor much easier, I can easily understand what parameter a function wants, without having to read the docstring or worse, the body of the function. typecheckers do find a lot of errors that would otherwise be runtime errors.

Typed Python code on average takes two times the time to develop and contains two times the number of bugs per delivered software feature.

It's bad, really really bad.

Refactoring can be done just as well via a good IDE and unit testing.

Using typechecking creates far more errors then it finds. They are a necessary evil in compiled languages. It's been measured that it creates more errors. That is not open for debate.

Re: The Python Paradox (2004)

#212
Having written my first Python & Java way before this article was written some of this stuff doesn't hold up all these years later. It took a while for startups to start using Python but there was already big OSS software infrastructure built in it in the 1990s. And everyone noticed it was slow too, in the 1990s I remember more of the Python software being interactive and/or having desktop GUI components that were laggy compared to C/C++ ones, even worse than Java GUI elements were at the time.

An opposite observation, the engineers that want to differentiate themselves by using "less popular" tools often have some of the biggest egos and are most blind to the issues in their designs.

The one place I worked where we built the application in Python was rife with: - People with a big chip on their shoulder about Java and .NET being inferior

- Constant talk about how bad Java/.NET were and how their use of Python was so much better

- The design of the product hit every weak point of Python that Java and .NET are much stronger at

- We had bugs & data leaks that Python's issues made possible in ways that were almost impossible in Java/.NET

- Performance issues and jumping through hoops due to Python's issues around multi-threading

- Tons of tech debt and difficult to decipher code

Still there was a good result in the end, and the rapid iteration of Python was helpful in getting things done fast. The question is how bad was it to deal with the issues after the exit when the new owners had to keep scaling it.

Another place we had a bitter LISPy guy. Always trying to write everything in the most esoteric language he could, always leaving behind maintenance issues, never stopping talking about how bad the tool chains were (Java/C++) that actually brought in the revenue his job depended on.

Re: The Python Paradox (2004)

#213
post #176

Earlier quoted context omitted.

Lack of typing support is a major advantage. If you don't have types you don't need interfaces, generics, etc. The resulting code is shorter and less bug prone.

Languages like Python and TypeScript support 'any' as a type, so you can always opt out of strong typing if you want. Most of the time generics are preferable to things randomly dying at runtime though.

Things don't die very often due to typing issues. The unit tests always pick up typing problems.

Testing the code's behavior implies testing the code's typing. And if you are not testing the code's behavior then the code isn't really tested at all.

Re: The Python Paradox (2004)

#214

Earlier quoted context omitted.

Lack of typing support is a major advantage. If you don't have types you don't need interfaces, generics, etc. The resulting code is shorter and less bug prone.

You still need all of that. You just have to store that information in documentation and do analysis in your head instead of relying on a static analyzer.

No, you really don't. Static typing is very complex and error prone compared to dynamic typing.

There is a lot less stuff that needs remembering.

Re: The Python Paradox (2004)

#215

Earlier quoted context omitted.

Python might have nice features, but it also has terrible features. Like using dicts for everything. It's not enough to allow good practices, you have to prevent (or at least reduce) bad practices.

You can use dataclasses instead of dict now.

Unless you use __slots__, aren't all class-based objects [specifically python2 new style `class MyClass(object): pass` or all python3 classes] dicts in Python?

Re: The Python Paradox (2004)

#216

Earlier quoted context omitted.

You can use dataclasses instead of dict now.

Unless you use __slots__, aren't all class-based objects [specifically python2 new style `class MyClass(object): pass` or all python3 classes] dicts in Python?

I was talking about the dataclasses.dataclass annotation in 3.10/3.11. You can use slots with it.

You’re right, they’re dicts unless slots are used. I read the parent comment and saying you can define types easily. But you can with dataclasses

Re: The Python Paradox (2004)

#217
post #180
post #43

Earlier quoted context omitted.

> Haskell and Idris are beautiful and powerful, but inaccessible to most software engineers. I don't see any fundamental reason why that should be the case. It seems to me that while it's true that most engineers would have a hard time navigating these languages today, it's mostly due to socio-historical accident. It's not because the languages are particularly difficult or arcane, it's mainly because people don't al…

> It's not because the languages are particularly difficult or arcane, it's mainly because people don't already know it, and people don't like to learn to do things differently: their experience stands in the way. I'm somewhat of a fan of Haskell (though its standard library is awful) and very much a fan of Idris (at the very least it's a better-Haskell, at best, dependent types!), but hard disagree. These languages…

Alternatively, getting started with Java you quickly hit polymorphism, inheritance, getters-and-setters, and null object handling.

And yet everyone in my intro to CS class in uni managed to pick up Java within a week or two. Haskell is a bit more involved than Python, but not more involved than most languages.

Re: The Python Paradox (2004)

#218
post #82

Earlier quoted context omitted.

Post a pic

A random file in the standard library: https://gcc.gnu.org/onlinedocs/gcc-4.6.3/libstdc++/api/a0109... Honestly I don't think it's that bad if you can look past all the underscores. I looked around for something worse but maybe I'm just accustomed to the eyebleed that C++ has to offer. To me, Rust is uglier, but that's because it's been around a quarter of the time that I've been using C++ and I don't know what all t…

Party pooper. Don't you know we are just here to bitch and moan?

Re: The Python Paradox (2004)

#219

Earlier quoted context omitted.

Rust is "not as used" but it has a following who hype it to the point that I've avoided taking time to relearn it just due to the strange vibes I get from their community. These people once mentioned, on twitter, that people who hate systemd are like reactionaries (as in, politically far right), as if a choice of init is a correlative of political ideology. When you view others' preferences for fucking software as so…

>These people once mentioned, on twitter, that people who hate systemd are like reactionaries (as in, politically far right), as if a choice of init is a correlative of political ideology. When you view others' preferences for fucking software as so important to your world view that they might as well be nazis[0], you can tell your priorities are not in order. I hate that everything is politically-coded nowadays, but…

You are correct, and that's an excellent analysis.

That's what I was getting at with my comment about how claiming we should go back to the steaming pile of shit System V init system with all its directories full of symlinks they think is "Classic Unix" is like claiming Nickelback's "Woke Up This Morning" is Classic Rock because you never heard of the Rolling Stones "Start Me Up".

https://news.ycombinator.com/item?id=34546815

There's definitely an underlying anti-BSD, anti-Berkeley, anti-hippie, anti-Mozilla, anti-woke, anti-gay, anti-trans, pro-Brendan-Eich, pro-GamerGate, alt-right sentiment that runs through all those irrationally ignorant anti-systemd weenies received belief system they parroted from 4Chan.

Re: The Python Paradox (2004)

#220
post #148

Earlier quoted context omitted.

If you want to understand how it might be motivated by security, just read the LKML threads around Rust - the Rust developers’ claims are at times pretty wild, and in my experience (after 20 years in infosec), they tend to have a relatively narrow view of “safe”. I am expecting new vulnerabilities to pop up from developer’s misunderstanding of what Rust actually guarantees, especially in the same memory space as the…

Do people even use C++ in embedded? Even subsets?

Yes.
Post reply on HN