On Wed, Jul 8, 2015 at 1:53 PM, Julian Manzano <[email protected]>
wrote:

>

3) Encapsulation:
>
> > External dispatch does make it non-obvious how to enforce encapsulation
> True, but for example, there are some proposals (Scott's one) where you
> can explicitly indicate that some fields are private to the module where
> the type is defined. This is just a proposal that, as Scott pointed out, is
> opt in, will not break anybody's code and I honestly do not think adds any
> significant complexity to the language. But, hey, this is just 'a' proposal.
>

The real question with any notion of privacy is "private from whom?"
Methods don't belong to any particular argument, so which of their
arguments' private fields are they allowed to fiddle with? And what about
more granular permissions like r/w? There are many ways to answer these
issues, but whatever one chooses, it's more complicated than just marking
some fields as private. It also doesn't enable anyone to do anything that
they couldn't do before, which is what we tend to prioritize at this point.

>

Reply via email to