Re: Clean Object Class Design -- What is it?

From: Steve Wart <swart_at_deadspam.com>
Date: Mon, 23 Jul 2001 22:40:49 GMT
Message-ID: <RJ177.22147$zb.389603_at_news1.rdc1.bc.home.com>


"Bob Badour" <bbadour_at_golden.net> wrote in message news:Tnr67.33$KX7.10316890_at_radon.golden.net...
>
> >However, is it necessary to have all three constructs (relations, tuples
 and
> >domains) that the relational model provides? For example, the Lisp model
> >provides two (atoms and lists) and the Smalltalk object model gets by
 with
> >one (objects).
>
> Relations are mathematical constructs. One can think of them as points in
 an
> N-dimensional space. One can think of them as sets of propositions. One
 can
> think of them simply as sets.
>
> As a result, one can use first order predicate logic to improve the
> understanding of the data model, to query databases, to transform queries
> into useful logical equivalents etc. One can apply set theory to all of
 the
> same uses.
>
> How is the Lisp model of atoms and lists equivalent to or derived from any
> branch of mathematics?

I am not a Lisp expert, but I will go out on a limb and say that the Lisp model, like any logical or mathematical model, has primitive constructs and formal rules from which statements of truth or valid expressions can be derived. I have added comp.lang.lisp to the distribution in case there is some interest from those folks in answering your question.

Why do we need to have a formal model from any particular branch of mathematics to be applied in the (decidedly formal) domain of computation?

> SmallTalk does not get by with one logical construct. It has object
 classes,
> object variables, references (ie. pointers) etc. While I do not know the
> details of the language, I am sure it also has at least one repeating
 group
> type such as array or collection. Does it have extents?

Smalltalk classes are objects, collections are also objects. That Smalltalk is able to get by without having any special types for "repeating groups" is due to some cleverness in the virtual machine that hides any such distinction. I suppose you could think of it as a way of providing logical independence in a general-purpose programming language.

By extent do you mean the set of all instances of a class? If so, it does not, but user-defined classes can keep track of their instances if they need to (classes are instances of their metaclasses and therefore can have user-defined behavior).

Here is a postscript paper on the Smalltalk object model (with reference to the Lisp model):

http://www.emn.fr/dept_info/perso/rivard/pub/reflection/reflex96.ps (493K)

Note that this paper is more oriented toward language design than it is toward "modeling reality". The diagram on p.4 will help to explain the metaclass concept, but it doesn't speak to the issues on the collection classes that you are likely to be concerned about.

> Stealing heavily from Chris Date (and Hugh Darwen) again: Think of domains
> (object classes) as the things we want to talk about and think of
 relations
> as what we want to say about them. I think it is reasonable to want to
 make
> statements regarding multiple things at once; hence, the tuple. I think it
> is reasonable to want to make the same statement about different
> combinations of things; hence, the relation.

This sounds fine, except I am not sure why a distinction is made between domains and tuples. It also seems reasonable to want to aggregate things at multiple levels and make statements on that basis. Why limit yourself to two levels? Just to make the math easier?

--
Regards,
Steve (steve at wart dot ca ICQ 50919689)
Received on Tue Jul 24 2001 - 00:40:49 CEST

Original text of this message