Peekee wrote:
>A type of variable is a property that the rules define as a varibale,  
>and specify the following:

You're mixing up three concepts here: variable, class of variable, and 
type of datum that a variable can store.  Please make them all distinct.

>b) The type of variable which can be one of: Date, Integer, Float, or
>String.

"Float" refers to an implementation technique for storing and manipulating
numerical values.  A floating-point type stores numbers as a fixed-length
fraction in binary (or occasionally some other radix) along with an
integral exponent.  It seems unlikely that we'd actually want to limit a
variable to the range of any particular floating-point type.  More likely
we'd want to allow any rational number (which is a restriction we have
in a couple of places).

Please define exactly what the range of each of these types is.  You refer
to "Null" later on, which is not naturally a value of any of these types.
Actually, to handle Null you might want to introduce disjunction (union)
types: define the type Void that has only one value Null, then a variable
can be restricted to type Integer+Void which means that it can store
either an integer value or Null.

It seems to me that switches are a special case of your variable concept,
where the restricting type is an enumeration.

-zefram

Reply via email to