Re: relations aren't types?

From: Adrian Kubala <adrian_at_sixfingeredman.net>
Date: Fri, 9 Jan 2004 12:46:47 -0600
Message-ID: <slrnbvtton.ano.adrian_at_sixfingeredman.net>


John Jacob <jingleheimerschmitt_at_hotmail.com> schrieb:
>> Types are types -- I don't understand your insistence on calling some
>> types scalar and other types not scalar. What's the difference?
>
> Why call relation types relation types? The difference is that they
> are different types of values. They are subject to different
> treatment in the language and therefore the logical model. I must use
> different constructs to create them and specify them. Certainly they
> are also values, and I can invoke operators that take them as
> arguments, but that doesn't mean there isn't value in categorizing
> them the same way we categorize other types of values (relation,
> tuple, bag, set, array, list, collection, etc.).

I think you're confusing types with type classes, and types with values, in the above. Certainly if "they" are "relation types", then they are NOT "also values".

Of the "types of values" you list, some are (usually) type classes or abstract data types (bag, set, collection), while others are just plain polymorphic types (relation, list).

Normally I'd consider atomic types provided by the system, like Char or Int, to be scalar types. What confuses me is: 1. that you claim that tuples (an algebraic datatype) are scalar but

   lists (also an algebraic datatype) aren't, and 2. that you want to be able to create new "scalar" types but using a

   different syntax for them than for other algebraic datatypes.

>> And I have to ask, what's an example of a user-defined scalar type?
>
> [date and 2-D coord types]
>
> These are scalar types because they expose no logical structure to the
> user. The type specifier is simply the user-supplied name of the type.
> A non-scalar type does expose logical structure to the user, as
> evidenced by the type specifier.

I have no idea what "logical structure" is, but it almost sounds like abstract datatypes are scalar but concrete datatypes aren't?

There exist languages in which you can use the same syntax to define a relation type as to define a date type or any other type you want. Are you saying that by not labeling some types as scalar (based on conditions which still sound ill-defined to me) and giving them a different syntax, these languages are less powerful or easy to use? Received on Fri Jan 09 2004 - 19:46:47 CET

Original text of this message