Live data from Hacker News

I'm switching to Python and actually liking it

cesarsotovalero.net

231–240 of 718 posts

Re: I'm switching to Python and actually liking it

#231

When did Python go out of fashion? This is the second article I've seen talking about it as if it's some kind abomination. I get that it's not the shiny new thing, but I don't understand people hating on it. Is this just junior devs who never learned it, or is there some new language out that I missed? (And please don't tell me Javascript....)

The v2 to v3 transition threw a lot of people.

Can we please stop reiterating the same old stories? That was years ago. Most Python devs these days never wrote a single line of Python 2. I learned it 16 years ago and, while frameworks like Django were still in the middle of the transition back then, I pretty much started learning & writing Python 3 right away.

Re: I'm switching to Python and actually liking it

#232

Earlier quoted context omitted.

As a nix user, you hardly need to know uv, but you might later need to know how to work together with non-nix-users who use uv. It's easy. There will be a file: uv.lock You can use uv2nix to get a single nix package for all the project's python dependencies, which you can then add to your devshell like anything else you find in nixpkgs (e.g. right alongside uv itself). It ends up being two or three lines of code to a…

Didn't I say I wasn't interested?

You created a place where the interaction between nix devshells and uv was relevant, I put something there to help passers-by that might be interested in those topics. It wasn't actually for you.

Re: I'm switching to Python and actually liking it

#233

When did Python go out of fashion? This is the second article I've seen talking about it as if it's some kind abomination. I get that it's not the shiny new thing, but I don't understand people hating on it. Is this just junior devs who never learned it, or is there some new language out that I missed? (And please don't tell me Javascript....)

A decade ago, Python was pretty rough around the edges in production. Of course you could make it work, but you had to sacrifice a lot in terms of:

- Environment / dependency management

- Type safety

- Performance

As the author points out, these have largely been addressed now by uv, type hints, pydantic, FastAPI, etc.

Re: I'm switching to Python and actually liking it

#234
post #163

Earlier quoted context omitted.

Yes, I'd say Python's crown as the go-to lightweight scripting and web development language was mostly ceded to JS. It's still reigning champion of data science, and of course it has a huge number of uses and users still around, but it's not really cool or in vogue outside of those circles.

Python has never been THE web development language, that's always been JavaScript. Python is one of the more popular server-side languages, and JavaScript has move from frontend to backend in the last decade too. Not sure whether this has really taken the crown of any backend-language. And what is lightweight scripting? Isn't scripting by definition lightweight? But Python overall is still very popular outside the Da…

[deleted]

Re: I'm switching to Python and actually liking it

#235

When did Python go out of fashion? This is the second article I've seen talking about it as if it's some kind abomination. I get that it's not the shiny new thing, but I don't understand people hating on it. Is this just junior devs who never learned it, or is there some new language out that I missed? (And please don't tell me Javascript....)

I haven't tried uv but my biggest pain point with Python has been the way env works. I always find it painful and odd.

Backward compatibility, which I suppose is closely related to needing to use env, is also a pain. In my experience you can't go forward or backward in many cases. It's especially painful on projects that don't change very often. I'm sure that an active codebase can probably be kept updated from version to version, but if you've waited a bunch of versions, it seems painful.

But, I'm not sure I've given it a fair shake because I haven't needed to. It's use in AI does make it an attractive option, now more than ever.

Re: I'm switching to Python and actually liking it

#236

Earlier quoted context omitted.

Apparently the author used to be a Java person. I have this feeling - or prejudice - that people still in the Java World are a bit out of tune with the tech industry, working on huge legacy projects on big retail or US banking. These people tend to be conservative and resistant to change, so maybe that's where these types of articles are coming from.

Java shops are certainly where I've witnessed the most disdain for Python. IME the strongest feelings tend to come from people who didn't actually have any significant experience with Python, and perhaps don't even have much practical experience with any language that isn't Java. So they tended to consider it to be objectively inferior purely because it's interpreted and dynamically typed. At a previous job I did man…

I have way more experience with Python than Java. In at least 4 companies (including Google that I wouldn't call a javashop) we used mainly Python.

Still I believe Java is a better application language. Python is a better scripting language (replacement for Bash). Small apps tend to be easier on Python, but large apps are way easier on Java, both for syntax (types) and ecosystem (libs).

Re: I'm switching to Python and actually liking it

#237

Earlier quoted context omitted.

Apparently the author used to be a Java person. I have this feeling - or prejudice - that people still in the Java World are a bit out of tune with the tech industry, working on huge legacy projects on big retail or US banking. These people tend to be conservative and resistant to change, so maybe that's where these types of articles are coming from.

I have a related feeling or prejudice that people not in the Java World view their corner as "the tech industry" without realizing that they are living in a village compared to the giant metropolis that is the Java World. Java programmers may not blog as much, and Java doesn't show up on Hacker News as much, but not being Extremely Online does not mean that it isn't extremely widely used by real people whose experien…

Lest we forget that Python is ~4 years older than Java.

Re: I'm switching to Python and actually liking it

#238

When did Python go out of fashion? This is the second article I've seen talking about it as if it's some kind abomination. I get that it's not the shiny new thing, but I don't understand people hating on it. Is this just junior devs who never learned it, or is there some new language out that I missed? (And please don't tell me Javascript....)

I have had a somewhat unearned distaste for Python for the last decade or so. I mostly just don’t like some of the design decisions it made. I don’t like that lambdas can’t span multiple lines, I don’t like how slow loops are, I don’t like some functions seem to mutate lists and others don’t, and I am sure that there are other things I missed. But it really comes down to the fact that my career hasn’t used it much. I…

The most insane python feature is that for loops keep their intermediate variable.

for x in [1,2,3]: print(x)

x sticks around! So you'll always have these random variables floating around, and hope you don't use the wrong one.

And to add insult to insult to injury, if you're using mypy for type checking you'll get a nice error if you try to reuse x with a different type:

for x in ['a', 'b', 'c']: print(x) And the types I can never trust. I've used all the tooling and you still get type errors in runtime. It's also ridiculously slow.

I would also like optional chaining (e.g. foo?.bar?.baz) and a million other features that other high level programming languages have.

Re: I'm switching to Python and actually liking it

#239

Earlier quoted context omitted.

There are massive numbers of devs who would never even think of trying to code in a dynamically-typed language, even though the big players all have gradual typing. They don't know what they're missing.

I have no problem with dynamically-typed languages, my main problem with Python is the significant whitespace. I really do not like it. I can deal with everything else in Python, or any other programming language, but significant whitespace is what kills it for me.

Having gotten back into Python for a project after some time away, I found the solution (for me) is to automatically fix the whitespace every time I run the code.

I just have a line in my Justfile that does this. Probably would be better to format on save but I use different editors and haven’t gotten around to it.

Still doesn’t fix the creeping doubts about everything in a language conceived by people who made that whitespace call, but it removes the specific pain point.

Re: I'm switching to Python and actually liking it

#240

When did Python go out of fashion? This is the second article I've seen talking about it as if it's some kind abomination. I get that it's not the shiny new thing, but I don't understand people hating on it. Is this just junior devs who never learned it, or is there some new language out that I missed? (And please don't tell me Javascript....)

When it got big enough that companies were forcing people to learn it. People automatically hate things they didn't choose themselves. Plus there has been a rising sentiment against dynamic typing by masochists over the last decade or so.

    > by masochists
Hey! The masochism pays dividends. I can't do anything with duck typing that I can't also do with `dyn Trait` abuse :)
Post reply on HN