Hacker News new | ask | show | jobs
by atomicnumber3 1269 days ago
I don't disagree with any of his points, actually, and agree with almost all of them. The standard library has some holes - though I think that's true everywhere. I don't know that eg Ruby or java don't have holes either.

I do think the packaging Story in python is nuts. Why does gem just work for Ruby but python's story is such a disaster? Though imo my modern advice is "just use poetry and ignore everything else".

Pythons main draw for me is some combination of:

Type hinting is good enough. It has a big escape hatch to be able to do C stuff if you need to. Numpy. The language is still straightforward enough that beginners can approach it and the experienced can wax reasonably eloquent with it. And it's pervasive.

So when I sit here and I'm like "ugh I need a thing to sit here and hit an api and dump it to a file every day in a cron job, and I don't want to spend a whole day writing this". I go for python. And while go and java and rust etc would be just fine, I still end up taking longer than I'd like.

Somehow python is just the shortest, sanest route to just getting a small to medium sized doodad out the door and running reliably in a small footprint of time without needing to remember boilerplate (java) or think way lower level than I'd like to (go/rust). Python just lets me do it with low cognitive overhead. Sometimes while I'm half-listening to a meeting I'm in!

Honestly my biggest gripe with python is it's really hard to tell early enough when your program is on a trajectory to be too big for python. And I don't mean from a perf perspective or anything, I just mean when it goes from being "easy python" to "oops it's spaghetti now." There's a tipping point and I think even seasoned people end up well past it by the time they pause and rub their eyes and think "ugh I wish this were in java."

2 comments

> The standard library has some holes - though I think that’s true everywhere. I don’t know that eg Ruby or java don’t have holes either.

Ruby has been actively stripping the stdlib, moving libraries to default and bundled gems.

> I do think the packaging Story in python is nuts.

That is one of my three big gripes with Python. The other two are the horrible way the 2 to 3 transition was managed and the GIL.

But none of those has driven me to switch to another language, nor do I expect it to. Go seems to be this author's alternative of choice; perhaps if my one goal in life was to write a production network backend without using any dependencies, I might agree, but it isn't, and having done some work with Go I find it gets in my way much more than Python does. I have the same problem with other languages.

> write a production network backend without using any dependencies

In this regard, I find it interesting that the following is currently on the HN front page:

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

TL/DR: Go's network sockets set TCP_NODELAY by default, which is, the article argues, a very bad idea.

The article is wrong and doesn't even address the primary reason why git-lfs is slow in his case.