encapsulation
Why doesn’t PHP permit private const?
I have a class that benefits from the use of constants in its internal implementation, but I would like to limit visibility of these constants. Why doesn’t PHP permit private constants? Is there another way to achieve this or is PHP trying to discourage some type of design misstep I am ignorant of?
Why are Python’s ‘private’ methods not actually private?
Python gives us the ability to create ‘private’ methods and variables within a class by prepending double underscores to the name, like this: __myPrivateMethod()
. How, then, can one explain this