Guido sees the light: PEP 8 updated

Rustom Mody rustompmody at gmail.com
Mon Apr 18 00:06:35 EDT 2016


On Sunday, April 17, 2016 at 3:34:56 PM UTC+5:30, BartC wrote:
> On 17/04/2016 04:44, Rustom Mody wrote:
> > On Saturday, April 16, 2016 at 10:22:10 PM UTC+5:30, Marko Rauhamaa wrote:
> 
> >> It comes with the maxim that one function must be visible at once on the
> >> screen.
> >
> > Thats a strange self-contradiction.  I wrote this:
> >   http://blog.languager.org/2012/10/layout-imperative-in-functional.html
> > to make the case against PEP8 style line length strictures.
> > Which has the SAME code formatted in two styles:
> >
> > --  < 80 cols, 48 lines
> > --  115 cols 37 lines
> >
> > Clearly the 115 cols is MORE fittable in a page than the 80 cols
> > [Though my argument for that is based on other structural/semantic principles]
> 
> Um, that's a different language, or does PEP8 apply to Haskell too?
> 
> Haskell has a style that likes to be written horizontally (rather than 
> have statements one after another - /on separate lines/ - as in 
> imperative code).
> 
> I also have trouble regarding that code as a single function, as it 
> implements (AFAICS) an entire lexer. It resembles data more than 
> anything else, and data presumably is allowed to be scrolled. 

Thats a nice point ... and often neglected by even the aficionados of functional
programming.
See Data Orientation http://blog.languager.org/2012/10/functional-programming-lost-booty.html
[yeah funny that I am tell you this given your recent famous thread on lexing!]

Come to think of it take an SQL DBMS browser.
Should we say: Horizontal scrolls are BAD; just reformat the table after reaching 80 columns?

In fact much of the point of 
http://blog.languager.org/2012/10/layout-imperative-in-functional.html
is just this: that as code becomes more and more data-ish,
a more-lines-less-columns regime becomes correspondingly irksome.

> Otherwise things would be very restrictive!

Dont understand that comment



More information about the Python-list mailing list