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

2000-08-21 Thread bhandley

> 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?

"to" could be exclusive and "thru" inclusive like parse. Don't know what you
do about the range start though.

".." is quite concise (if barely legible on my monitor ;) ). So if we were
lucky enough to get some range math use a .. b for an inclusive range as
suggested before.
a <.. b for an exclusive start point and inclusive end point
a ..> b you can guess
a <..> b a range that does not include the end points

Brett.




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

2000-08-21 Thread Al . Bri

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 [EMAIL PROTECTED]

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
http://members.xoom.com/AndrewMartin/
-><-




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

2000-08-20 Thread gschwarz

The "to" has won me.
Greg
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 21, 2000 16:37
Subject: [REBOL] Enhancement Request - Range! datatype Re:(5)


> Hi Andrew,
>
> I like the use of "-" but I feel it will cause confusion if a negative is
> used in the range.
>
> -1--10
>
> ".." 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
>
> 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?
>
> Cheers,
>
> Allen K
>