| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: The wisdom of the object mentors (Was: Searching OO Associations with RDBMS Persistence Models)
On 1 Jun 2006 10:19:45 -0700, Mikito Harakiri wrote:
> Dmitry A. Kazakov wrote:
>> On 1 Jun 2006 09:08:23 -0700, Mikito Harakiri wrote: >>> Function is a set of ordered pairs such that a certain condition is >>> met. Where is "object" in this definition? >> >> I said - an object corresponding to function. Function is the value of that >> object. If 2 can be a value, why a function cannot be?
These are three questions in one. There is a sufficient difference between:
To have objects you need only 1. When a function is declared the compiler can easily create an anonymous type for it. That would be 1. If you want a type of functions 2. that shouldn't be a big problem either. There is little difference between that and pointers to functions. You can find them in practically any language.
Class of functions is more interesting, but if the signature is fixed it imposes no problem. As a guess, a polymorphic functional objects should multiple dispatch on the tuple: (function, argument lists, result lists).
Class of all functions, that might be really difficult, if possible. There are as well many interesting questions about classes of polymorphic functions, inheritance from functions, relationships between functions on related types. For example is the type of functions on a subtype a subtype of the type of functions on the base type? Without an elaborated and consistent type theory they are difficult to answer.
Operations on functions (subprograms):
Map : f x x1 x x2 x ... x xN -> y1 x y2 x ... x yN
2. Composition:
o : f1 x f2 -> f1 (f2 (x))
3. Comparison
:= : f -> f
5. Convolution
and so on
>> But that is rather trivial and uninteresting.
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.
>> The question was actually about subprograms >> rather than mathematical functions. They can be objects.
Don't you see any difference between mathematical constructs and programming language objects?
-- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.deReceived on Thu Jun 01 2006 - 13:38:42 CDT
![]() |
![]() |