3 ms·
I work just fine in a language that has no "private" variables or methods. It's not for everyone, and it requires some discipline to not get burned. Don't get
by zo1 12y ago
I work just fine in a language that has no "private" variables or methods. It's not for everyone, and it requires some discipline to not get burned.
Don't get me wrong, I'm big on encapsulation and separation of concerns, etc. But you don't need to force "privacy" onto your class's users in order to achieve it.
The worst thing about having everything public (this is python, btw) is that sometimes it pollutes the auto-complete, and hinders discoverability. It's also not immediately obvious what the user should/shouldn't have access in your class.