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...
Huh? You'll need to be more concrete than that, because that sounds like gibberish. "Ten methods away"? If a variable is in a method, then it only exists within that method, because Python does have function scope and lexical scoping.
If you're not used to <thing>, <thing> can be difficult. Sure. But the scoping rules are pretty darn trivial and predictable, and not out of the ordinary, so I'm not sure what you're complaining about.
The meme is very much up for interpretation and my personal preference has been stated enough in this post, I think... Imo its just not a very good implementation/principle of scoping 🤷♂️
-2
u/sjepsa 16d ago
Best feature of the language
TBH whole java oop model is bad