On Saturday 08 December 2001 06:26, Geoffrey Talvola wrote:
> On Friday December 07, 2001 09:38 pm, Tavis Rudd wrote:
> > Yes, but narrow columns are easier to read and 80 columns is
> > easier to deal with on terminals and in source code listings
> > (i.e. pydoc)
>
> I agree with Chuck on this one.  80 columns is only half the width
> of my screen.  I'd prefer to make use of my whole screen, thank you
> very much :-)

That's the whole point, many tools are designed on this assumption 
and have dockbars down the left side or use multiple vertical frames. 
80 might be a bit zealous, but code does get ugly in many tools when 
wider than 80.

> The problem with limiting yourself to 80-column lines is that then
> you find yourself shortening variable names just so you can make
> things fit within 80 columns.  You have a lot more multi-line
> continuations, which reduces readability.  

I disagree about readability.  My code follows the 80/90 column rule 
and I never find my self shortening varnames to make things fit. Line 
continuations with slashes aren't all that pretty, but there's always 
another way of wrapping ---> parenthesized statements

This is bloody hard to read:

assert not self._factoryByExt.has_key(ext), 'Extension (%s) for 
factory (%s) was already used by factory (%s)' % (ext, 
self._factoryByExt[ext].name(), factory.name())

while this isn't:

assert not self._factoryByExt.has_key(ext), (
     "Extension (%s) for factory (%s) was " 
     "already used by factory (%s)" 
     % (ext, self._factoryByExt[ext].name(), 
        factory.name())
     )
It's longer, but at least you can see what's going on in single 
glance. 


This is more readable

dispatcher = _SSLDispatcher(self, service, serviceName, address,
                            sslContext=sslContext,
                            manageService=manageService,
                            settings=settings)

than:

dispatcher = _SSLDispatcher(self, service, serviceName, address, 
sslContext=sslContext, manageService=manageService, settings=settings)


> And I never code on an
> 80-column terminal, and I can't remember the last time I actually
> printed out some code to read, so those arguments don't sway me at
> all.

What about reading the output of grep in a shell window where each 
line is prefaced with the name of the file and the line num.  I do 
this very frequently when trying to grok code and anything longer 
than 90 makes it harder to find what I'm looking for.

And how about viewcvs.cgi when you're using the diff view? ... or any 
other multi-column diff tool.

And how about pasting code snippets into an email?

When I mentioned source code listings I was referring to 
listings that are inluded as part of Developers' Guides and even 
Users' guides. Code wider than 80 looks hideous in a pdf.

;) whew, I didn't realize I cared that much about it ...

Tavis



_______________________________________________
Webware-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-devel

Reply via email to