[REBOL] Re: Rebol interpreter bug with comparison of dates
From: carl:cybercraft at: 4-Dec-2002 21:08
On 04-Dec-02, Anton wrote:
> An invalid comparison should throw an
> "invalid comparison" error.
> If a < b returns false, that implies
>> = b should return true, but
> under your scheme it would also return false.
> I think your scheme would produce far more
I tend to agree here - it should return an error when it doesn't make
sense to compare different datatypes.
> Maybe an explanation for the problem is that
> the < operator tries to convert the second
> argument to the datatype of the first argument.
> So a word can perhaps be converted to a date
> (I did this in the console via a string).
> But I had trouble converting a word to a date!
>> Carl wrote:
>>> Andrew wrote:
>>>> The correct response from Rebol should be like:
>>>>>> 4/Dec/2002 < 'foo
>>>> == false
>> Don't you mean true? Surely they both can't be greater than each
>> I'm right. :) Both:
>> 4/Dec/2002 < 'foo
>> 'foo < 4/Dec/2002
>> should return 'false, because both are invalid comparisons.
>> Andrew Martin