Page 2 of 2
Re: Simple approach to call private methods in modules
Posted: Thu Aug 01, 2013 7:46 pm
by NoahPhense
Thanks David, helps a lot.
- np
Re: Simple approach to call private methods in modules
Posted: Thu Aug 01, 2013 8:36 pm
by USCode
fsw wrote:Just be open minded.
But not too open minded, otherwise your brain could fall out.

That's what I'm afraid of!

I'll take a look at it when the final version is released.
Initially it sounded like namespaces to me but I think other folks have pointed out that is not correct.
Re: Simple approach to call private methods in modules
Posted: Thu Aug 01, 2013 10:00 pm
by c4s
fsw wrote:c4s wrote:BorisTheOld wrote:[...] Over time, classes become dependent on the inner workings of other classes. [...]
If a programmer knows how to
code properly, sticks to general coding standards and complies with the documented behavior (most important!), this would
never happen.
Never say
never.
Otherwise people reading this will think you are too far removed from reality.
It's funny because I knew that the "never" would cause some discussion.
Still, let's say you're working in a team. Now the only thing you know about a class is its signature and the documentation, because you didn't implement it yourself (and you don't have access to the source). If you want to interact with that class you can only rely on the documented behavior. So I really don't see how one could get dependent on the inner workings...
Re: Simple approach to call private methods in modules
Posted: Thu Aug 01, 2013 11:59 pm
by fsw
Just saying: experience taught me otherwise.
If your experience differs - be happy!

Re: Simple approach to call private methods in modules
Posted: Fri Aug 02, 2013 12:09 am
by Fred
USCode wrote:fsw wrote:Just be open minded.
But not too open minded, otherwise your brain could fall out.

That's what I'm afraid of!

I'll take a look at it when the final version is released.
Initially it sounded like namespaces to me but I think other folks have pointed out that is not correct.
It's like namespace.
Re: Simple approach to call private methods in modules
Posted: Fri Aug 02, 2013 2:24 am
by USCode
Fred wrote:USCode wrote:fsw wrote:Just be open minded.
But not too open minded, otherwise your brain could fall out.

That's what I'm afraid of!

I'll take a look at it when the final version is released.
Initially it sounded like namespaces to me but I think other folks have pointed out that is not correct.
It's like namespace.
Excellent, good work Fred!

Re: Simple approach to call private methods in modules
Posted: Fri Aug 02, 2013 4:25 pm
by BorisTheOld
c4s wrote:Still, let's say you're working in a team. Now the only thing you know about a class is its signature and the documentation, because you didn't implement it yourself (and you don't have access to the source). If you want to interact with that class you can only rely on the documented behavior. So I really don't see how one could get dependent on the inner workings...
The problem is not with the use of a class, but with the maintenance of class code in complex systems with hundreds, or thousands, of interrelated classes and multiple levels of inheritance.
Over the years, classes evolve to meet the demands of new applications. As a result, inherited methods often need to handle conflicting situations. This is where the problems begin. Eventually, as more and more classes evolve in this way, the whole system begins to collapse -- maintenance and bug fixing becomes a major problem.
In theory this should never happen, but the universe tends to be a fickle place in which to strive for perfection.