3 ms·
If you want to maintain both syntaxes and have there be some sort of equivalence between them, then I think think the type system should handle it. Where a type
by throwaway17_17 4y ago
If you want to maintain both syntaxes and have there be some sort of equivalence between them, then I think think the type system should handle it. Where a type operator ‘private-access’ grants access to some objects private fields and then obj.f() == f(private-access obj).
Maybe this would be seen as a violation of encapsulation, but to make the two equivalent requires the ability to allow private variable access at the call cite.
- jakelazaroff 4y agoThe point is that they’re not equivalent. What’s the difference between your proposal and just not having private members at all?