this post was submitted on 28 Nov 2024
452 points (88.2% liked)

Programmer Humor

32692 readers
293 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] eager_eagle 21 points 2 weeks ago (2 children)

You can totally write heavy duty things if you know what you're doing: use type hints, static checkers, tests, etc. It just takes a bit more effort and care.

[–] ByteJunk 16 points 2 weeks ago (2 children)

But why would I use something that takes more effort and care?

I'm sure you're right and it's possible, but if I don't have to fix another python project at work I'll be in heaven.

[–] grue 18 points 2 weeks ago (1 children)

Because "more effort and care" in Python is still way less of a pain in the ass than the minimum enforced boilerplate necessary in most other languages.

[–] [email protected] 7 points 2 weeks ago (1 children)

I mean, is it? I personally haven't found Python using much less boilerplate. It's possible, but you end up with something inflexible that's hard to maintain.

[–] grue 3 points 2 weeks ago (2 children)

Implement a basic socket connection in C (20 lines of manipulating struct sockaddrs and such), then do the same in Python (2 lines).

And then go back and make the C version support IPV6, because your initial implementation didn't.

[–] [email protected] 7 points 2 weeks ago

Or use a statically typed language that’s actually modern instead of C

[–] [email protected] 6 points 2 weeks ago

"Look, Python is way easier to use than other languages! Look how complex this easy task is in Python versus other languages like assembly and brainfuck!"

I'm not saying "do stuff in C it's easier than Python", but if I took e.g. C# then it's also just two lines. That supports everything and is also faster than the Python implementation.

[–] eager_eagle 4 points 2 weeks ago

it's more effort and care compared to a throwaway script, not necessarily compared to other languages

[–] [email protected] 4 points 2 weeks ago (1 children)

Personally, my estimate doubles when we're asked to implement something in Python...

[–] eager_eagle 7 points 2 weeks ago (2 children)

That's a proficiency matter. Python is the language I can get something done the fastest today, but 6 years ago that would be Java or even JS for me.

[–] [email protected] 5 points 2 weeks ago

Eh, it's most definitely part of it, but the biggest time sink that I expect when working with Python is fixing the build system every two weeks on different devs' PCs. I do imagine, if you eventually find a solution that works on most PCs that this workload will go down, but we had a substantial Python part in my previous project and over the course of the 1½ years that we worked on it, it really felt like we were making negative progress. Near the end of it, I couldn't use PyCharm anymore, because I couldn't figure out for the life of me, how to make it recognize the dependencies again.

[–] fuck_u_spez_in_particular 5 points 2 weeks ago

Nah it's also a language matter. People complain about Rusts complexity, meanwhile I complain about everything else in other languages, and am faster than in any other language, not necessarily because writing code is faster, but because I am able to just focus on writing code. I cannot tell that about other languages, because e.g. the packaging system is bad, or configuring an environment, or debugging stuff which a strong type-system would have caught already. Also IDE experience I think is the one thing that keeps me away from dynamic languages. Rust analyzer is so much better than anything else I've tried, and it keeps getting better (e.g. recently it was added to show whether a trait is object safe or not, and why it is not).

Another thing that is often missed when comparing static with dynamic languages is just performance, python heavily relies on stuff written in a system language, as soon as a hot-loop is written in python, things get bad...