Annoying octal notation

James Harris james.harris.1 at googlemail.com
Thu Sep 3 10:59:22 EDT 2009


On 3 Sep, 15:35, Grant Edwards <invalid at invalid> wrote:

...

> >>> Obviously I can't speak for Ken Thompson's motivation in creating this
> >>> feature, but I'm pretty sure it wasn't to save typing or space on
> >>> punchcards. Even in 1969, hex was more common than octal, and yet hex
> >>> values are written with 0x. My guess is that he wanted all numbers to
> >>> start with a digit, to simplify parsing, and beyond that, it was just his
> >>> programming style -- why call the copy command `copy` when you could call
> >>> it `cp`? (Thompson was the co-inventor of Unix.)
>
> >>Maybe it was because they were working on minicomputers, not mainframes,
> >>so there was less processing power and storage available.
>
> > Not just any minicomputers: PDP11. Octal notation is friendly with
> > the PDP11 instruction set.
>
> Indeed.  Octal was the way that all of the DEC PDP-11 sw tools
> displayed machine code/data.

True. Octal was default in Macro-11 and what surprises me is that when
I used it it seemed natural to think in octal (or, preferably, hex)
rather than decimal.

James



More information about the Python-list mailing list