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

Date: 1 Jun 2006 13:07:49 -0700

Message-ID: <1149192469.826992.307190_at_u72g2000cwu.googlegroups.com>

Dmitry A. Kazakov wrote:

> Operations on functions (subprograms):

These are easily defined in the realtional world (where we consider a function as a relation)

> 1. Mapping (call to) the tuple of arguments to the tuple of results

*>
**> Map : f x x1 x x2 x ... x xN -> y1 x y2 x ... x yN
*

Calling a function f(x,y) with two arguments x=1 and y=2 is relational join of three relations:

> 2. Composition:

*>
**> o : f1 x f2 -> f1 (f2 (x))
*

Composition of y=f(x) and z=g(y) is relational join

projected to attributes x and z.

> 3. Comparison

*>
**> = : f1 x f2 -> Boolean
*

> 4. Copy (for marshaling, closures etc)

*>
**> := : f -> f
*

Copying is not a logical operation. Yet it corresponds to a trivial relational query that outputs the same relation.

> 5. Convolution

*>
**> * : f1 x f2 x sum x prod x inv -> sum (prod (f(x), g(inv (x)))
*

In your description I don't see how convolution is different from composition.

> 6. Extension

*>
**> and so on
*

What is extension?

> >> But that is rather trivial and uninteresting.

*> >
**> > Well, it's hardly trivial for numbers, why it suddenly becomes trivial
**> > for functions?
**>
**> Because in this particular case function is a value and values are outside
**> the language scope. Somewhere in the application domain exists 2. So there
**> does sine. You don't care what they are. You only need some object to
**> represent them. Let the bit pattern 0x1 represent 2 and 0x2 do sine. End of
**> story.
*

I don't understand this gibberish.

> Don't you see any difference between mathematical constructs and

*> programming language objects?
*

Yes. Programming language objects are bastardized counterparts of mathematical constructs. Received on Thu Jun 01 2006 - 22:07:49 CEST