Re: Access a private variable?
Re: Access a private variable?
- Subject: Re: Access a private variable?
- From: Sacha Mallais <email@hidden>
- Date: Fri, 15 Jul 2005 18:54:49 -0700
On Jul 15, 2005, at 4:45 PM, Robert Walker wrote:
Bertrand Meyer (OOSC, 2nd Ed, p 347) would call it an error ("a
wrong decision made during the development of a... system"), but
"bug" can mean error, defect ("a property of a... system that may
cause [it] to depart from its intended behaviour") or fault ("the
event of a... system departing from its intended behaviour...").
Well unless there is more to this than I see here, I wouldn't
interpret this that way at all. "A wrong decision made during
development..." Wrong by who's option? The developer expressed
his intention in the documentation, implemented what was described
in the documentation, and the code behaves according to the
described intent. How can this be called a "bug" or "wrong decision?"
You could argue that not including a count of the in-memory-filtered
objects was the correct decision, but I doubt many people would agree
with you. :-)
If this interpretation of "bug" is true, then it really is
impossible to write bug-free software.
Isn't that a standard comp sci litany? Every program (of reasonable
complexity) has bugs.
Corollary: the smallest program consists of a single line, which is
wrong. ;-)
You would have to implement every feature that any person could
imagine in order to be bug-free.
It certainly can be a matter of opinion what features to include in a
given class. I think it's fair to say, in this case, they should
have included a way to get the whole array of in-memory-filtered
objects; it was a bug not to include it.
Besides, isn't this why OOP exists in the first place (so
developers can add additional behavior to a class for the purpose
of extending the class's usefulness)?
The ability to be "open" (i.e. extensible) and "closed" (i.e. stable)
at the same time is a major selling point of OOP, but not the only
raison d'ĂȘtre. Other reasons are left as an exercise for the
reader. ;-)
So I guess this means that all subclasses are "bug fixes" according
to this definition.
A class that has a specific or intended subclass is not a bug fix:
that is called design.
sacha
--
Sacha Michel Mallais - 400 lb. chimp
Global Village Consulting Inc.: http://www.global-village.net/
Choke on that, causality! -- the Professor, "Futurama"
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden