Annoying octal notation

NevilleDNZ nevillednz at
Sat Sep 5 03:09:19 CEST 2009

On Sep 3, 2:57 pm, James Harris <james.harri... at> wrote:
> On 3 Sep, 14:26, Albert van der Horst <alb... at>
> wrote:
> > In article <6031ba08-08c8-416b-91db-ce8ff57ae... at>,
> > James Harris  <james.harri... at> wrote:
> > <SNIP>
> > >So you are saying that Smalltalk has <base in decimal>r<number> where
> > >r is presumably for radix? That's maybe best of all. It preserves the
> > >syntactic requirement of starting a number with a digit and seems to
> > >have greatest flexibility. Not sure how good it looks but it's
> > >certainly not bad.
> > >  0xff & 0x0e | 0b1101
> > >  16rff & 16r0e | 2r1101
> > >Hmm. Maybe a symbol would be better than a letter.
> > Like 0#ff  16#ff ?
> Yes, that looks better.
> > That is ALGOL68. It is incredible how many of it has become
> > vindicated over time. (Yes, nineteen hundred sixty eight was
> > the year that language was conceived.)
> Yes, and its predecessor Algol 60 was a masterful advance in
> programming languages. It set up standards we still use today.

> James

However I don't recall Algol60 having Bin/Oct/Hex numeric
literals.  c.f.

And I am pretty sure that Algol60 had neither builtin
byte operators (eg xor, shl/shr), nor a builtin ability to
read nor printf oct/hex.  Maybe these were in AlgolW or a
Burroughs/Unisys dialect of Algol60?

(FYI: AlgolW has been reincarnated by Glyn Webster with
his worthy AlgolW to gcc 'C' translator.  To be found at:

The lack input/output in Algol60 did mean you could never
shoot yourself in the foot with true Algol60 c.f.:
>* Algol 58/60+ - shoot yourself in the foot with a Civil
>   War-era musket. The musket is aesthetically fascinating,
>   and the wound baffles the adolescent medic in the
>   emergency room.
>* Algol 60 - You spend hours trying to figure out how
>   to fire the gun because it has no provisions for input
>   or output.

On the other hand compare:
>* Algol 68 - You mildly deprocedure the gun, the bullet
>   gets firmly dereferenced, and your foot is strongly
>   coerced to void.

(I do know Algol 68 has the builtin mode "BITS" with
matching literals, casts, operators and input/output, cf: )

And in summary of 41 years of language advancement:
>* Python - You shoot yourself in the foot and then brag
>   for hours about how much more elegantly you did it
>   than if you had been using C or (God forbid) Perl.

N joy

More information about the Python-list mailing list