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

[REBOL] Re: native? :==

From: holger:rebol at: 4-Feb-2002 7:15

On Mon, Feb 04, 2002 at 12:44:51AM -0600, Joel Neely wrote:
> Hi, Hallvard, > > Hallvard Ystad wrote: > > > > Why is this: > > > > >> native? :> > == false > > > > Perhaps for the same reason as this existentialist error message:
No :).
> >> pair? 1x1 > == true > >> pair? 2x2 > == true > >> 1x1 < 2x2 > ** Script Error: Expected one of: pair! - not: pair! > ** Near: 1x1 < 2x2
Yes, the error message is less than informative :). The reason for it is sound though. Multi-dimensional entities such as pairs do not have a useful total ordering, i.e. less than/greater than comparisons are not always possible (e.g. what is 1x2 < 2x1 supposed to return ?). If they were allowed by the language (as in early versions of View) that could lead to difficult to track down bugs in scripts. -- Holger Kruse [holger--rebol--com]