Re:This is the page that made doing OOP in Javascript click ...
by malkia on Thursday September 11, 2008 @04:05PM
(#301710)
Using closures really hides them.
Just think about this, I know a fellow programmer (A C fan), that used to pun another one (his best friend A C++ guru) - so the former used to have this:
#define private public
#define protected public
This just shows how fragile the protection of member variables in C++ is (side effect of the pre-processor).
After all, good C++ books recommend hiding data through other means (pointer that points to structure not published anywhere else (like in a library))
Just think about this, I know a fellow programmer (A C fan), that used to pun another one (his best friend A C++ guru) - so the former used to have this:
#define private public #define protected public
This just shows how fragile the protection of member variables in C++ is (side effect of the pre-processor).
After all, good C++ books recommend hiding data through other means (pointer that points to structure not published anywhere else (like in a library))