Annoying octal notation

Grant Edwards invalid at invalid
Thu Sep 3 10:35:27 EDT 2009


On 2009-09-03, Albert van der Horst <albert at spenarnc.xs4all.nl> wrote:
> In article <mailman.591.1251468775.2854.python-list at python.org>,
> MRAB  <python at mrabarnett.plus.com> wrote:
>>Steven D'Aprano wrote:
><SNIP>
>>> 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.

-- 
Grant Edwards                   grante             Yow! My CODE of ETHICS
                                  at               is vacationing at famed
                               visi.com            SCHROON LAKE in upstate
                                                   New York!!



More information about the Python-list mailing list