in reply to Re^3: I hate the leading underscores.
in thread I hate the leading underscores.
there are no built-in security measures in place to hide variables and methodsThe way to hide variables and methods is not to document them. Programmers using a module are not expected to read the code, they're expected to read the documentation. Using undocumented features is always an At Your Own Risk activity.
If you prefer to make things programmatically inaccessible, scoping is the built-in tool for that, though I don't think that proper methods (automatically passing self) can be made this way. I'm not sure why you don't consider closures a built-in way to hide things.
More on this topic in Private Methods Meditation.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: I hate the leading underscores.
by RazorbladeBidet (Friar) on Feb 16, 2005 at 18:32 UTC | |
by Roy Johnson (Monsignor) on Feb 16, 2005 at 19:04 UTC | |
by TimToady (Parson) on Feb 16, 2005 at 20:31 UTC | |
by Roy Johnson (Monsignor) on Feb 16, 2005 at 20:52 UTC | |
by RazorbladeBidet (Friar) on Feb 16, 2005 at 19:13 UTC | |
by itub (Priest) on Feb 16, 2005 at 19:37 UTC | |
by Roy Johnson (Monsignor) on Feb 16, 2005 at 19:32 UTC |