#define class struct
#define private public
#define protected public
11–20 of 140 posts
#define class struct
#define private public
#define protected public
Love it!
It's interesting to see how important compiler-enforced access specifiers were to C++ and Java. It seems they are going out of fashion. In the Python world they were always considered a bit silly.
If you explained Unix file permissions to a Windows guy, he'd probably think it was silly. They exist for a purpose though- just not a purpose the Windows guy has spent much time with.
This reads like an Onion article.
I sympathize, yet encapsulation is appropriate for some projects. Not all users of a library want to frequently update to their own code. Forbidding encapsulation and deprecation would increase this cost. Also, it's comforting to be able to refactor the guts of a class without harming users.
[deleted]
Personally I would prefer a script that made all variables private and removed setters, but I suppose that would be more useful than funny.