Annoying octal notation

Albert van der Horst albert at spenarnc.xs4all.nl
Thu Sep 3 10:04:12 EDT 2009


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.

Groetjes Albert

--
-- 
Albert van der Horst, UTRECHT,THE NETHERLANDS
Economic growth -- being exponential -- ultimately falters.
albert at spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst




More information about the Python-list mailing list