Re: data & code

From: Laconic2 <laconic2_at_comcast.net>
Date: Thu, 27 May 2004 08:51:32 -0400
Message-ID: <XoydnXkhPOeVeSjdRVn-gw_at_comcast.com>


"Dawn M. Wolthuis" <dwolt_at_tincat-group.com> wrote in message news:c938nq$8r0$1_at_news.netins.net...

> For the definition of type?
>
> Def: The type of a variable v is the set of all valid values for v.

I think it's worthwhile to have two different terms for the set of all possible values of a variable
and the same thing plus some defined operators. I like the word "domain" for the set of all possible

values of a variable, and the word "type" for "domain plus operators".

However, I'll admit that, even though I like it, I don't tend to use it. My tendency is to use "type" and "domain" as synonyms. That's sloppy of me.

>
> Note: The "type" of a value only makes sense to me as short-hand means of
> discussing the type of the variable whose value is this. Values outside
of
> the context of a variable have no type as far as I'm concerned, even if
they
> have a representation that looks like representations of some type.

Perhaps. But many of the formal descriptions of procedural languages explicitly point out the type of literal constants. For example,

23 is an integer.
23.0 is a real.
'23.0' is a character string.

And in PASCAL, the symbolic constants acquire a type based on the type of the value they are assigned.

I suppose a symbolic constant could be thought of as having a domain consisting of one element. Received on Thu May 27 2004 - 14:51:32 CEST

Original text of this message