Re: data & code

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


Paul wrote:

> Leandro Guimaraens Faria Corsetti Dutra wrote:
>

>>> I am still looking for 'type'.
>>
>> Would saying that a type is a domain plus its operator be OK?

>
> Do you mean operators plural?
>
> What about operators that take their argument from more than one data
> type? e.g. multipying a real by an integer? or concatenating a char a
> given number of times? Where do these operators fit in?

How operator and types relate to eachother is more complicated than simply "A type and it's operators".

In Perl there is a 'scalar' datatype. Depending on which comparison operator is used - from either (eq, lt, le, gt, ne) or (==, <, <=, >,  >=, !=), the value of the scalar variable is considered 'characterstring' or 'numeric' (if possible) for the comparison operator. Now I am not saying that every language should do it this way, just that it is evidently possible.

Definitons for these terms should not ignore this possibility. Received on Thu May 27 2004 - 22:40:56 CEST

Original text of this message