Re:Why should I have written ZeroMQ in C, not C++ (part II)
by akkartik on Thursday August 30, 2012 @01:31PM
(#4455727)
I'm amazed nobody is talking about his 'private in' idea.
[ Parent
| on HN ]
Re:Why should I have written ZeroMQ in C, not C++ (part II)
by scott_s on Thursday August 30, 2012 @07:25PM
(#4457403)
I did; we can achieve the same functionality through mixins: http://news.ycombinator.com/item?id=4455823
Re:Why should I have written ZeroMQ in C, not C++ (part II)
by tedunangst on Thursday August 30, 2012 @02:07PM
(#4455904)
Perhaps someone could explain how it differs and compares to the friend keyword.
Re:Why should I have written ZeroMQ in C, not C++ (part II)
by akkartik on Thursday August 30, 2012 @02:12PM
(#4455930)
It has more to do with layout than with access control. Fields belonging to one class get stored and laid out with another object. They're accessed as part of the other object, but the locks they acquire are for the original object.
I see faint echoes of ruby's open classes if I squint..