Re: What databases have taught me

From: Bob Badour <bbadour_at_pei.sympatico.ca>
Date: Sat, 01 Jul 2006 01:36:26 GMT
Message-ID: <ukkpg.4384$pu3.102379_at_ursa-nb00s0.nbnet.nb.ca>


Keith H Duggar wrote:
> Marshall wrote:
>

>>Dmitry A. Kazakov wrote:
>>
>>>N is a type, but in a different meaning (it still has
>>>some operations defined). But this type is different
>>>from one of (N, +). (N, *) is yet another type. (N, +,
>>>*) is a fourth type. You've god the idea, I think.
>>
>>Okay. So if I have a type N, with a minimal set of
>>operators (just "successor") and another module extends N
>>with a + function, and a different module extends N with a
>>* function, then we have three different types of N, is
>>that correct? Have we broken interoperability between N
>>values coming from the three modules now? If not, in what
>>sense are they different types?

>
> Or when I load your module and define an arbitrary function
> on your type N have I now defined a new type? Of course not.
> Which is why I think Dmitry's notion of type is somewhat
> useless in a programming context. Similary, Bob's view that
>
> Bob Badour wrote :
>
>>Marshall wrote :
>>
>>>given:
>>>f: A, B -> C
>>>is f part of the defintion or A, or of B, or both? What
>>>about C? Just curious.
>>>
>>
>>f is defined on all three A, B and C. Thus f is part of
>>the definitions of three data types.

>
>
> all functions operating on a given data type are part of the
> /definition/ of that data type, doesn't seem useful, at
> least in a programming context. Why are we not free to
> choose which operations /define/ a data type and which are
> merely /auxiliary/ or /derived/. How is it useful to think
> that anytime we define functions we are redefining the types
> of it's arguments?

Declaring an operation to be in scope is not the same as defining the function. Describing an implementation for an operation is not the same as defining the function.

[Quoted] I am speaking of data type as a concept. The integer data type has an unlimited number of operations defined on it. In most contexts, only a tiny subset of them are in scope.

> (Note I'm treating function/operator and argument/operand as
> synonymous in the above.)

I think I understand what you are saying. I think that is a mistake, but not the mistake you will assume: An operator is a symbol (and not necessarily a single character either.) Thus the name of any function is an operator. I prefer to speak of operators and operations, because it is not always clear when one says 'function' whether one means the name or the operation or the algorithm.

Argument and operand are synonyms, though. Received on Sat Jul 01 2006 - 03:36:26 CEST

Original text of this message