nemesis <nam### [at] gmailcom> wrote:
> Warp escreveu:
> > nemesis <nam### [at] gmailcom> wrote:
> >> I'm sorry, but that simply doesn't follow.
> >
> > Why not? Having the compiler check for breaking of agreements (eg. "don't
> > access these variables") is much better than oral agreements. The compiler
> > is much better at catching mistakes than you are.
> Now I (think I) understand the root of our disagreement. I'm thinking
> about functional programming here with only functions accessible per
> interface, you're thinking about what variable can be accessed and
> whatnot in a severely mutable setting. It all becomes really hard when
> you allow state to dominate. So hard that even very experienced
> programmers can face dificulty handling it all, thus having to invent
> all sorts of levels of accessibility rather than just rely on lexical scope.
Not all member functions have to be public either. It's extremely common
for a class to have private member functions which are part of its internal
implementation and not even intended to be part of the public interface.
I would say that being able to define private member functions is equally
important as being able to define private member variables.
--
- Warp
Post a reply to this message
|