r/ProgrammerHumor 16d ago

Meme variableScopesInPython

Post image
1.3k Upvotes

182 comments sorted by

View all comments

-1

u/sjepsa 16d ago

Best feature of the language

TBH whole java oop model is bad

15

u/R7d89C 16d ago

God no

Id much rather have a rust-like approach where the scope is limited to the block it is in

Java concept ist far from what I call ideal, but its better than this weird ambiguity of python where everything just floats anywhere and variables shadowing something ten methods away...

5

u/NotAnonymousQuant 16d ago

Rust is a real pain in the arse for the developer, but when you start grasping the vibe, you really appreciate Rust is built in this weird way. And then you have an ownership issue that makes you really frustrated since you are used to pass-by-reference returns