r/ProgrammerHumor • • 5d ago

Meme pythonSlow

Post image
11k Upvotes

417 comments sorted by

View all comments

Show parent comment

6

u/Fmeson 5d ago

Ah,  you're a troll

-4

u/anzu3278 5d ago

No mon I be fully human, by Zul I swear.

6

u/tragiktimes 5d ago

Dumbest thing ive read yet today. Nice.

3

u/Fmeson 5d ago

Then you can understand Python being simple to write is an advantage, not a weakness. 

1

u/Ok_Turnover_1235 5d ago

By that logic we should all still be using VB6 and it's a great language.

-1

u/Fmeson 5d ago

I said being simple is an advantage, not that it is the only thing that matters.

3

u/Ok_Turnover_1235 5d ago edited 5d ago

I pointed out in another thread, simplicity takes a lot of options away from you and actually makes a lot of things harder or worse. Runtime type checking has to happen on every operation, an integer isn't just a value, it's a full object with reference counts, metadata, etc. Static analysis isn't possible, the list goes on. Cache alignment can't be done a per platform basis, and has to be done by padding data structures manually which means it fails or doesn't work properly on a platform with a smaller or larger cache.

It's an advantage if you're optimising for development time and not quality (of any kind, whether that's performance or memory usage or whatever). It's syntax isn't actually any better than C++ or rust in a lot of cases, and doing OOP in it just awful.

1

u/Fmeson 5d ago

It's an advantage if you're optimising for development time

That is often the most important thing. Maybe it's even usually the most important thing.

I remember a senior guy teaching me early on to ask "How much do I gain by optimizing for my resources vs. the computers". There is a huge range of use cases where the programmers resources are far more valuable.

e.g. Writing statistical analysis code for a scientific experiment. Making a data pipeline. Writing a script to do some file manipulation on your computer.

Hell, half the time I need rust or C++, it ends up being really nice to write a library and call it from python.

0

u/Ok_Turnover_1235 5d ago

Oh I'm not saying there aren't situations where a scripting language isn't the best option, but imo they're niche, and most of the time I'd rather have something that compiles into beautiful machine code and can benefit from compiler optimisations. Once you start taking the easy option the harder option just seems a little harder every time and every time you take the harder option it's a little easier the next time

2

u/Fmeson 5d ago

They're far from niche, that's why python is one of the most commonly used languages today.

I'm guessing those use cases are less common for what you do as a programmer (idk, maybe you do software dev or something similar), but they're quite common for a lot of people, especially people who program in support of their main work (e.g. scientists, researchers, accountants, engineers, etc...)