Re: The wisdom of the object mentors (Was: Searching OO Associations with RDBMS Persistence Models)

From: Bob Badour <bbadour_at_pei.sympatico.ca>
Date: Fri, 02 Jun 2006 23:02:49 GMT
Message-ID: <ts3gg.16691$A26.385545_at_ursa-nb00s0.nbnet.nb.ca>


erk wrote:

> David Cressey wrote:
>

>>I thought the diffence between a "domain" and a "type" was precisely that
>>types include operators while domains do not.

>
> Neither types nor domains "include" operators. Functions can be defined
> over one or more types, but calling a function an operator is
> imprecise. I suppose "operator" generally means a function of type T
> -> X or of type X -> T (constructor), but really only functions of type
> T -> T -> ... -> T could properly be said to be "included" in type T.

The term 'operator' means a symbol signifying some operation. Conceptually, a type is a set of values and all operations defined using that type. An algebra of the type is that subset of operations defined only on the type.

> This is why first-class functions, and multimethods, make so much
> sense; and one of the reasons why the forced bondage of every single
> function to a single class (as in Java) is so much nonsense.

I agree. Whether a type is used in the first parameter, the third parameter, the nth parameter, or the value returned, the operation is defined using the type. Received on Sat Jun 03 2006 - 01:02:49 CEST

Original text of this message