[ABE.pm] Seeking comments re OOP (Continuing my series of dumb questions)

Randy Kramer rhkramer at gmail.com
Tue Dec 28 13:16:21 CST 2004


As I'm reading on Ruby, I have some wierd observations / questions. 
Here's the next:

It seems to me that there are several different "categories" of
objects, and some things may be more "worthwhile" to be treated as
objects than others.  Consider a banking application:

   * a bank account could be an object, the balance could be an
attribute (member, whatever)
   * the balance of a bank account could be an object (rather than the
balance being an attribute of another (bigger) object) (not really
sure there's an advantage to this way of thinking about it, just
listed it because its possible)
   * (all) numbers (that could represent the balance of the account)
can be objects (note that here I'm thinking about "all" numbers that
could make up the value representing the balance could be objects, not
the specific number representing the balance).
   
It seems that in Ruby and Python, those numbers (all numbers) are
objects, but, at least in the context of a banking application, I
don't see the value of having those numbers be objects vs. simply
being "values" without representing objects.  Instead, it seems like
having those numerical values be objects rather than values (not
objects) just adds some extra overhead.

Of course, if your programming in a language that treats all numbers
as objects, that's what you live with, it just seems like overkill or
something.

Comments?

Randy Kramer


More information about the ABE-pm mailing list