[Edu-sig] Re: rationals
Kirby Urner
urnerk@qwest.net
Fri, 11 Oct 2002 11:24:21 -0700
At 02:10 PM 10/11/2002 -0400, Christopher A. Craig wrote:
>"Kirby Urner" <urnerk@qwest.net> writes:
>
> > (I like the r as the final symbol in the number name, as L used to
> > be for longs).
> >
> > Kirby
>
>It's my understanding that that is exactly what Guido is proposing.
OK, so I think we're on the same page then.
It's still two extra symbols (both / and r) vs. one (r) to write
1/2r versus 1r2, and it takes even more symbols to write (1/2)r.
I like J's economy, but I can see 1/2r as a very viable alternative.
As you say, it has much in common with 1+2j, where you need both
+ and j (two symbols) to signify complex.
An argument for 1r2 is that 1e2 sets a precedent. But 1j2 is not
legal in Python, as it is in J, so the consistency is shakier
(not as *much* precedent).
Another point:
With longs, I can use either upper or lower case l, which isn't
so readable in code, as lowercase l looks like 1. But r and R
are clearly not numbers. So I assume the following would likewise
be legal:
>>> 1/2R
(1/2)r
or maybe that's 1/2r -- not sure which.
Kirby