The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
* [TUHS] 80 columns ...
@ 2017-11-08 20:52 ron minnich
  2017-11-08 21:02 ` Larry McVoy
                   ` (3 more replies)
  0 siblings, 4 replies; 66+ messages in thread
From: ron minnich @ 2017-11-08 20:52 UTC (permalink / raw)


So, 80 column folks, would you find this
a(b,
c,
d)

more readable than
a(b,c,d)

(this is a real example, with slightly shortened names)

would you have code review software that automatically bounces out lines
that are 82 columns wide? How far does this go?

I do recall 80 column monitors, but I started on 132 column decwriter IIs
and hence have never had sympathy for 80 columns. It's weird that so many
punched-card standards are required in our code bases now (see: Linux).

 moving away from serious ... (look for Presottos' I feel so liberated ...)

http://comp.os.plan9.narkive.com/4W8iThHW/9fans-acme-fonts
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20171108/ffcf954a/attachment.html>


^ permalink raw reply	[flat|nested] 66+ messages in thread
* [TUHS] 80 columns ...
@ 2017-11-10 17:21 Norman Wilson
  2017-11-10 17:56 ` Larry McVoy
  2017-11-11 17:04 ` Ian Zimmerman
  0 siblings, 2 replies; 66+ messages in thread
From: Norman Wilson @ 2017-11-10 17:21 UTC (permalink / raw)


Nemo:

  And for that reason, I have never used Python.  (I have a mental block
  about that.)

====

I used to feel the same way.  A few years ago I held my nose
and jumped in.  I'm glad I did; Python is a nifty little
language that, now I know it, hits a sweet spot twixt low-level
C and high-level shell and awk scripts.

Denoting blocks solely by indentation isn't at all bad once
you do it; no worse than adapting from do ... end to C's {}.

What still bugs me about Python:
-- It is unreasonably messy to give someone else a copy of
a program composed of many internal modules.  Apparently
you are expected to give her a handful of files, to be
installed in some directory whose name must be added to
the search path in every Python source file that imports
them.  I have come up with my own hacky workaround but it
would be nice if the language provided a graceful way to,
e.g., catenate multiple modules into a single source file
for distribution.
-- I miss C's style of for loop, though not often.  (Not
quite everything can be turned into a list or an iterator.)
-- I miss one particular case of assigment having a value:
that of
	while ((val = function()) != STOP)
		do something with val
Again, there are clunky ways to work around this.

As for 80 columns, I'm firmly in the camp that says that
if you need a lot of indentation you're doing it wrong.
Usually it means you should be pulling the details out
into separate functions.  Functions that run on for many,
many lines (once upon a time it was meaningful to say
for many pages, but no longer) are just as bad, for the
same reason: it's hard to read and understand the code,
because you have to keep so many details in your head at
once.

Likewise for excessive use of global variables, for that
matter, a flaw that is still quite common in C code.

Having to break an expression or a function call over
multiple lines is more problematic.  It's clearer not
to have to do that.  It helps not to make function or
variable names longer than necessary, but one can carry
that too far too.

Style and clarity are hard, but they are what distinguishes
a crap hack programmer from a good one.

Norman Wilson
Toronto ON
(Sitting on the lower level of a train in Texas,
not on a pedestal)


^ permalink raw reply	[flat|nested] 66+ messages in thread

end of thread, other threads:[~2017-11-11 18:05 UTC | newest]

Thread overview: 66+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-08 20:52 [TUHS] 80 columns ron minnich
2017-11-08 21:02 ` Larry McVoy
2017-11-08 21:19   ` Dan Cross
2017-11-08 21:24     ` Larry McVoy
2017-11-08 21:28       ` Steve Nickolas
2017-11-08 21:48         ` [TUHS] (cassette) tape coming back [was " Charles H Sauer
2017-11-08 22:46           ` Don Hopkins
2017-11-08 23:28         ` [TUHS] " Dave Horsfall
2017-11-08 23:35           ` Ron Natalie
2017-11-08 23:39             ` Dave Horsfall
2017-11-08 21:34       ` Dan Cross
2017-11-08 21:40         ` Dan Cross
2017-11-08 21:40         ` Larry McVoy
2017-11-08 21:43           ` Dan Cross
2017-11-09  1:00             ` Theodore Ts'o
2017-11-08 23:46     ` Steffen Nurpmeso
2017-11-09  6:52       ` Otto Moerbeek
2017-11-08 21:06 ` Bakul Shah
2017-11-08 21:18   ` Steve Nickolas
2017-11-08 22:17 ` Grant Taylor
2017-11-08 22:30   ` Arthur Krewat
2017-11-08 23:07     ` Andy Kosela
2017-11-08 23:15       ` Arthur Krewat
2017-11-08 23:15         ` Warner Losh
2017-11-08 23:49           ` Arthur Krewat
2017-11-09  0:04             ` Dave Horsfall
2017-11-08 23:24         ` Andy Kosela
2017-11-09  7:24 ` Lars Brinkhoff
2017-11-09 15:02   ` Don Hopkins
2017-11-09 19:14     ` Ron Natalie
2017-11-10 16:18       ` Nemo
2017-11-10 19:05         ` Jon Steinhart
2017-11-10 20:36           ` Toby Thain
2017-11-10 20:39             ` Larry McVoy
2017-11-10 20:46               ` Warner Losh
2017-11-10 20:59                 ` Larry McVoy
2017-11-11  9:24                 ` David Arnold
2017-11-10 20:43             ` Jon Steinhart
2017-11-10 20:58               ` Larry McVoy
2017-11-10 21:02                 ` Jon Steinhart
2017-11-10 21:09                   ` Larry McVoy
2017-11-10 21:12                     ` Jon Steinhart
2017-11-10 21:34                       ` William Corcoran
2017-11-10 21:50                         ` Jon Steinhart
2017-11-10 22:58                         ` Dave Horsfall
2017-11-10 23:05                           ` Jon Steinhart
2017-11-10 23:52                             ` Toby Thain
2017-11-11  0:24                             ` Larry McVoy
2017-11-11 16:40                   ` Ian Zimmerman
2017-11-11 16:47                     ` Larry McVoy
2017-11-11 17:23                       ` Jon Steinhart
2017-11-11 17:38                         ` Ralph Corderoy
2017-11-10 22:46               ` Toby Thain
2017-11-10 22:59                 ` Jon Steinhart
2017-11-11 14:33                   ` Andy Kosela
2017-11-11 17:19                     ` Jon Steinhart
2017-11-11 17:24                       ` Larry McVoy
2017-11-11 17:25                         ` Jon Steinhart
2017-11-10 23:59           ` Don Hopkins
2017-11-10 22:10         ` Dave Horsfall
2017-11-09 20:46     ` Lars Brinkhoff
2017-11-10 17:21 Norman Wilson
2017-11-10 17:56 ` Larry McVoy
2017-11-11 17:04 ` Ian Zimmerman
2017-11-11 17:30   ` Random832
2017-11-11 18:05     ` Ian Zimmerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).