Re: data & code

From: mAsterdam <mAsterdam_at_vrijdag.org>
Date: Thu, 27 May 2004 22:23:58 +0200
Message-ID: <40b64e5d$0$48959$e4fe514c_at_news.xs4all.nl>


Laconic2 wrote:

> Dawn M. Wolthuis wrote:

>>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.

Sometimes one has to redefine existing words to get a point across. But language is as language does. One cannot by simply redefining a word change the everyday use of it, expect everybody else to follow suit. It seems to me the meaning of 'type' (IT word at first roughly equivalent to the mathematical 'domain') is extended to encompass operators just to avoid the word 'class'.

I don't think your usage qualifies as sloppy.

>>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.

Clever :-) Received on Thu May 27 2004 - 22:23:58 CEST

Original text of this message