Re: [#valueTesting] equality and unknown dataypes

On 7 Jun 2006, at 13:53, Seaborne, Andy wrote:
> ==== Situation
>
> Consider the tests:
>
>   1 != "a"^^:utype
>   "A"^^:utype = "a"^^:utype
>
> for some currently-unknown-to-the-processor :utype.
>
> Now suppose the processor learns about :utype, and now knows that  
> the lexical for "a" in datatype :utype is mapped to the value 1.
...

> == Design 3 : Value testing where possible, default to error
>
> Another suggestion was testing by-value for "=", "!=" and "<", with  
> an error on cases where the process had no clue.
>
>   1 != "a"^^:utype
>
> is an error if :utype is unknown.  Only
>
>   "a"^^:utype = "a"^^:utype  ==> true
>   "a"^^:utype != "a"^^:utype ==> false
>
> because in these cases the process does know these to be correct.

This (3) is my preference.

- Steve

Received on Wednesday, 7 June 2006 14:04:19 UTC