Larry Wall & Cults

jmfbahciv at aol.com jmfbahciv at aol.com
Sun Aug 29 05:55:33 EDT 2004


In article <cJWdnetJbNOixazcRVn-iA at speakeasy.net>,
   rpw3 at rpw3.org (Rob Warnock) wrote:
>+---------------
>| jdoherty at nowhere.null.not (John Doherty) wrote:
>| >AND HOW MANY SPACES PER TAB STOP?
>| 
>| Eight.  Now talk about indenting skip returns...that one
>| required blood transfusions.  [emoticon looks at list of n.g.]
>| I guess not many will understand.
>+---------------
>      
>You might be surprised, Barb. Quite a few of the comp.lang.lisp crew 
>are former PDP-10 geeks.  ;-}

<GRIN>  Yep for Lisp, but Perl and Python?  Everything after python is
printing off my screen (I hate forms).
>  
>And just to be sure *I'm* understanding what you're talking about,  ;-}
>did you mean the convention of the second line of the following snippet?

Yep, but you have a bug.  The MOVEI [emoticon scrolls down to look]
heh...  my reply form is non-porportional and now everything is
wrong.  That's why the hard and fast rule of 8 was used in PDP-10
land.
>  
>    foo:    pushj   p,ckperm
>	     pjrst  badprm          ; user lacks privs, complain & return.
>	    movei   t0,cmdblk       ; o.k. to proceed.
>	    ...
>
>Indenting the non-skip return for a subroutine call was always pretty 
>clear to me. 

It was to the -20 types, too.  The -10 types maintained that,
if the human code reader didn't know the call had a skip return,
he had no business looking at the code.  Having the opcodes all
line up left-justified made reading code quickly possible.

> ..Where things got really muddled (and contentious!) was 
>when you had long skip chains of T{R,L}{Z,O,C,~}{N,E} instructions 
>in which whether a particular instruction was in the skipped-to or 
>non-skipped position depended dynamically on the flow of control 
>above it. [HAKMEM was chock-full of that kind of "efficient" code.]
>In that case, it seemed more readable to simply not indent anything in
>the skip chain, and put a scary comment warning about the tricky code.

If you knew your biz, you didn't need the scary warning.  Now
consider a list of PUSHJs where each could have a skip, 
double-skip or triple-skip return.  Depending on which way
you're flowing through the code, each and every one could be
indented and not-indented.

/BAH

Subtract a hundred and four for e-mail.



More information about the Python-list mailing list