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 18:31

On Mon, Feb 04, 2002 at 05:22:05PM -0600, Joel Neely wrote:
> I guess my background prepares me to think that having two of > something is just a special case of having N of something. While > it is handy to have a data type that *can* be used to represent > coordinates in a two-dimensional vector space, that's not the same > as saying that the data type can *only* be used to represent such > coordinates.
Pairs are rather specialized. They were added for /View, and should only be used in that context.
> It also seems odd to me that < excludes pair data on the basis that > there's no meaningful way to compare, when REBOL clearly *does* have > the notion of ordering of pairs, as shown below:
Internally REBOL needs to be able to compare any type to any other type, even, functions, natives etc., e.g. in order for 'sort to terminate. That does not mean that those comparisons are necessarily useful or part of the language.
> * < (and all other order tests) should be implemented consistently > with MAXIMUM-OF and MININUM-OF, or > * MAXIMUM-OF and MINIMUM-OF should refuse to operate on pairs as > do the simple order tests (< and company).
No. User-level comparisons have to be logical, easy to remember and useful. Internally any value has to be comparable to any other value though, which is what you see when you call a function that performs internal comparisons.
> As was pointed out by someone else recently, exceptions and in- > consistencies form a barrier to entry for newcomers to a language. > I'd like newcomers to be able to learn REBOL (and oldcomers to be > able to use it... ;-) as easily as possible!
Agreed. -- Holger Kruse [holger--rebol--com]