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

[REBOL] Enhancement Request - Range! datatype Re:(6)

From: al:bri:xtra at: 21-Aug-2000 19:23

AllenK wrote:
> I like the use of "-" but I feel it will cause confusion if a negative is
used in the range.
> -1--10
Actually, the lesser value should be first. So this should be: -10--1 It does look a bit odd for negative numbers. Perhaps both ".." and "-" could be allowed? Then: -10..-1 looks better.
> ".." does indicate in English text that something has not been left out.
But it is confusing if a decimal is used in the range.
> .1...10
It does look odd. Though it does look slightly clearer if leading zeroes are added: 0.1..0.12 It's better looking with "-": 0.1-0.12
> So what other suggestions could we have for the operator? > > how about? > 1to10 > -1to-10 > .1to.10 > > Is using n"to"n that different from using n"x"n for pairs? It is
immediately obvious that it is a range, ( in English at least).
> Other ideas?
I quite like the "to" as a range! datatype indicator. Thanks for the suggestion, Allen. I've CC-ed this to [feedback--rebol--com]. For range! datatype, use one or more of the following: - ; The dash. .. ; Two full stops. to ; The letters to, meaning "to". to indicate a range! datatype. I'd like the ability to have all three as alternatives. But if I'm forced to have only one, I'd prefer "to" as the range! datatype indicator. This shouldn't preclude the use of 'to as a word, just as the pair! datatype doesn't preclude the use of 'x as a word. Andrew Martin ICQ: 26227169