<p><span class="h-card" translate="no"><a href="https://mastodon.social/@whitequark" class="u-url mention">@<span>whitequark</span></a></span> That sounds similar to C++ "friend" where it exposes all of the members though.</p><p>As an example of where this is useful, I want to have an allocator object that contains a number of child objects and calls a method to default-initialize that object before giving it out to an end user, but I don't want that method accessible in the public API.</p><p>But I also don't want the allocator to have access to all of the internals of the child.</p>