Re: Object-relational impedence

From: Yagotta B. Kidding <ybk_at_mymail.com>
Date: Mon, 10 Mar 2008 04:14:51 +0100 (CET)
Message-ID: <Xns9A5CEC99B1CC8vdghher_at_194.177.96.26>


S Perryman <q_at_q.com> wrote in news:fr1kav$1su$1_at_aioe.org:

> Yagotta B. Kidding wrote:
>

>> S Perryman <q_at_q.com> wrote in news:fr0hft$8gf$1_at_aioe.org:

>
> YK>Hold on, you have a value of type Set<T> assigned to a variable of
> YK>type Set<type{x,y}>.
>
>>>Basic type substitutability (structural equivalence) .
>>>The { x, y } type has properties in common with T (the x/y
>>>properties) . Therefore the assignment is legal.

>
>>>So the assignment is a projection is of a type (x,y,z) to a type
>>>(x,y) 

>
>> I think you are confused at least on two counts.  

>
>> In any OO langauage I am familiar wth, you can assign a subtype value
>> to a supertype variable.

>
>> However, you did not establish any
>> subtype/supertype relationship in your example, therefore, the
>> assignment is illegal.

>
> 1. You are correct, if you use the *Simula* model of type
> substitutability
> (ie Y is substitutable for X if there is an inheritance lineage
> from Y to X) .
>
> 2. There are OO prog langs, strongly and weakly typed, that are not
> forced to use the Simula model.
>

That's a good point.

>

>> Even when you establish such relationship, no projection really takes
>> place, the information is still there, it's just hidden, as can
>> easily be seen by casting back to the original subtype. 

>
> Is this not an implementation aspect, as opposed to a conceptual one
> ?? There could be prog langs that forbid coercion back the other way
> etc (even if the underlying impl was using a "hidden" approach) .
>

I think you are right about the implementation aspect and I agree that the structural supertype assignment can be viewed as a projection.

>
> Regards,
> Steven Perryman
Received on Mon Mar 10 2008 - 04:14:51 CET

Original text of this message