4 ms·
I'm far from the most experienced in C++, but friend classes/functions do not seem to have a direct equivalent in any other language.
by sk0g 4y ago
I'm far from the most experienced in C++, but friend classes/functions do not seem to have a direct equivalent in any other language.
- socialdemocrat 4y agoBecause you don’t need them in other languages.
- ncmncm 4y agoNB: Friend-this and -that are not among powerful features of C++.
- int_19h 4y agoIn C#, nested classes are effectively friends with their outer class, and it's used quite often in practice. On the other end of expressivity, in Eiffel, every class member is declared as visible to specific other classes; if you want something to be public, you say that it's visible to ANY, which is the universal base class similar to e.g. Object in Java.