Re: what are keys and surrogates?

From: Bob Badour <bbadour_at_pei.sympatico.ca>
Date: Sun, 27 Jan 2008 22:09:57 -0400
Message-ID: <479d397c$0$4076$9a566e8b_at_news.aliant.net>


Marshall wrote:

> On Jan 17, 5:40 am, Bob Badour <bbad..._at_pei.sympatico.ca> wrote:
>

>>Marshall wrote:
>>
>>>>Except "selector" has no concept of physically building anything in storage.
>>
>>>Okay. Just specifying a value, or a kind of value, yes?
>>>That's more or less what I understand the most general
>>>definition of the word "constructor" to mean. The OOP
>>>world uses it a bit more specifically.
>>
>>I suspect the word originates in the OOP world, and it strongly suggests
>>building something physical.

>
> They use the word in the FP world too, and they hate those
> OOP guys probably more than we do! :-) :-) :-)
>
>
>>>>>I have no strong feelings about encapsulated ADTs; what
>>>>>Date calls ... uh. Shit. I can't remember what he calls them.
>>>>>I don't entirely see the reason for them. Performance I guess?
>>
>>>>Types? Possible representations? Type generators? Only the first is an
>>>>ADT, but I am curious whether you meant one of the others.
>>
>>>Possreps! That's the one!
>>
>>Having multiple possible representations for the same type allows data
>>independence--especially physical independence.

>
> Right. It's just that I can't seem to fit the need for physical
> independence
> at the scalar type level into my brain. It may well be a bug in my
> thought
> process. I don't *reject* the idea but I don't *accept* it either. I
> just
> can't get any mental traction on it at all.

In my mind, the canonical example is the Complex data type. Phasors/polars are faster to multiply and cartesians are faster to add. I should expect one would want to choose whether to physically store Complex values as phasors as cartesian coordinates or as a tagged representation that could be either.

> It would probably help if I had a use-case that matches something
> from my own experience. The usual examples don't solve any
> problems I can recall having. Could just be that I haven't been
> in the situation where the idea is useful.

Like many programmers, I suspect your experience relies less on abstract data types and more on algorithms. Received on Mon Jan 28 2008 - 03:09:57 CET

Original text of this message