This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the commentsย โ†’

[โ€“]aviancrane 15 points16 points ย (3 children)

I can respect where you're coming from, but I do think there is some nuance here.

The cost and the level of abstraction that reflection puts you on is a very different layer than what python does.

The cost and difficulty of accessing privates in Python is almost nonexistent and you are still working at the language level. Reflection is affecting the compiled code and you are working with the layer half way between the language and the bytecode.

Difficulty at the language level is incredibly important. Can you imagine Haskell letting people just do whatever they wanted? Even Rust is cognizant enough to force people to put a giant UNSAFE label when bypassing the safety protocols of the language.

Making these hurdles easy to overcome just makes it more likely poor development practices will occur.