Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Rebol interpreter bug with comparison of dates

From: g:santilli:tiscalinet:it at: 4-Dec-2002 16:58

Hi Jan, On Wednesday, December 4, 2002, 4:07:13 PM, you wrote: JS> But what does this mean: JS> >> safe-greater? 2x4 1x3 JS> == true That REBOL will, for some reason, sort 2x4 after 1x3. (I wrote those two functions to use them in my b*tree implementation; you will want to insert in it any REBOL value like you can do in a REBOL hash!, and you will want it to sort values in the same way SORT does...) I know that this does not make sense, and RT knows too. A couple versions before the current one (maybe you were not here yet) GREATER? and LESSER? were able to compare pair!s; Carl decided that it wasn't a good thing after all and so now it gives an error. So, I agree with you that comparison only makes sense to things that can be ordered; however, due to its nature, REBOL will actually order any value, even if this ordering is absolutely arbitrary. You don't really want SORT to give back an error, and once we have a function that can sort any couple of REBOL values, we have an implicit (even if arbitrary) ordering relation between all of the REBOL values. Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amigan -- AGI L'Aquila -- REB: