Re: Radix (was Re: Perl6 Operator List)

2002-10-28 Thread Larry Wall
On Sun, 27 Oct 2002, Mark J. Reed wrote:
: On 2002-10-26 at 18:10:39, Michael Lazzaro wrote:
:   Larry wrote:
:If one were going to generalize that, one would be tempted to go the Ada
:route of specifying the radix explicitly:
: Ada and others . . . ksh uses the # for this (in place of your colon below),
: and I seem to recall that syntax being borrowed from an older language, but
: I don't recall which one.

Well, that's Ada, actually.  I substituted the colon because I didn't
want to overload our comment character.  Though numbers could do that,
just as m## already does.  I presume that m## is one of those things
you avoid in IDEs though.  Something to be said for disallowing m##
while we're disallowing m:: and m().  Something to be said against
it too...

Larry




Re: Radix (was Re: Perl6 Operator List)

2002-10-27 Thread Mark J. Reed
On 2002-10-26 at 18:10:39, Michael Lazzaro wrote:
  Larry wrote:
   If one were going to generalize that, one would be tempted to go the Ada
   route of specifying the radix explicitly:
Ada and others . . . ksh uses the # for this (in place of your colon below),
and I seem to recall that syntax being borrowed from an older language, but
I don't recall which one.  (Although ksh does also have the annoying
leading-zero-means-octal behavior when there is no explicit radix).

 0123# decimal
 2:0110  # binary
 8:123   # octal
 16:123  # hex
 256:192.168.1.0 # base 256

-- 
Mark REED| CNN Internet Technology
1 CNN Center Rm SW0831G  | [EMAIL PROTECTED]
Atlanta, GA 30348  USA   | +1 404 827 4754



Radix (was Re: Perl6 Operator List)

2002-10-26 Thread Michael Lazzaro
 Larry wrote:
  If one were going to generalize that, one would be tempted to go the Ada
  route of specifying the radix explicitly:
 
0123# decimal
2:0110  # binary
8:123   # octal
16:123  # hex
256:192.168.1.0 # base 256

Heck that'd be fine with me... then I can easily do stuff in base 36,
which I do a lot of.  :-/  Still might want a letter shortcut for b/o/h,
though.  Just as long as 0123 doesn't magically mean octal I'm happy. 
Stupid, STUPID OCTAL.

:-)

MikeL