My new favorite programming language feature
Friendship in C++: A friend of a class is an external function or class that has access to the private and protected members of this class. Isn’t it lovely?
More favorites:
- In chuck, function declaration is fun.
- maybe() (also from chuck): a method for the non-decisive programmer. Returns 0 or 1 at random.
2007-01-19 at 9.19 am
As an undergrad, one of my CS professors explained friend classes this way:
Friends can play with your private parts.
:D
2007-01-20 at 9.11 pm
yes, that’s a lovely feature for a friend to have