Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #29552

Re: Origin of the story that K&R style was chosen to save paper

From Keith Thompson <kst-u@mib.org>
Newsgroups comp.lang.c
Subject Re: Origin of the story that K&R style was chosen to save paper
Date 2012-12-20 14:26 -0800
Organization None to speak of
Message-ID <lnehikqs0u.fsf@nuthaus.mib.org> (permalink)
References <abb4c7f1-f3bc-4d29-8e1c-f5c38d4983f6@googlegroups.com> <k94qkt$7l3$1@dont-email.me> <kfnd2y8j41s.fsf@x-alumni2.alumni.caltech.edu> <lnbodsigvp.fsf@nuthaus.mib.org> <kfna9t8fvit.fsf@x-alumni2.alumni.caltech.edu>

Show all headers | View raw


Tim Rentsch <txr@alumni.caltech.edu> writes:
> Keith Thompson <kst-u@mib.org> writes:
>> Tim Rentsch <txr@alumni.caltech.edu> writes:
>>> Rui Maciel <rui.maciel@gmail.com> writes:
>> [...]
>>>> So, I suspect that the statement "the reason the $terse_style was
>>>> chosen for $random_book was because $random_publisher wanted to
>>>> reduce the length of the book" will essentially be true for pretty
>>>> much every book published through a publisher.
>>>
>>> This idea is easily refuted simply by observing the enormous
>>> numbers of C or C++ books (not to mention Java, etc) that
>>> use an open bracing style in their code samples.
>>
>> And by the assumption that all publishers have the same policies.
>
> I'm sure that by now such books have appeared from so many
> different publishers that all relevant ones are represented.

I don't want to spend too much time on this profoundly trivial point,
but ... well, actually, apparently I do want to spend too much time
on it.

It's not inherently implausible that Prentice Hall, back in 1978,
asked Kernighan and Ritchie to use a particular brace style in
their book to save paper (and presumably that K&R2 used the same
style for consistency, or because it wasn't worth the effort to
change it).  This could have been the whim of an individual editor,
which wouldn't apply to other publishers, or even to other books
by the same publisher.

What's even more plausible, though, is that K&R (both editions) use
the brace style they do because it's the same one used by earlier C
reference manuals going back to 1974, and Ken Thompson's B manual
of 1972.  (BCPL didn't use curly braces.)  That brace style may
well have been motivated by saving paper, but presumably Prentice
Hall was not involved.

References:
    http://cm.bell-labs.com/cm/cs/who/dmr/kbman.pdf (B)
    http://cm.bell-labs.com/cm/cs/who/dmr/cman74.pdf (early C)
    http://cm.bell-labs.com/cm/cs/who/dmr/cman.pdf (slightly later C,
    still pre-K&R1)

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
    Will write code for food.
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Origin of the story that K&R style was chosen to save paper Paul Sinnett <paul.sinnett@gmail.com> - 2012-11-27 14:13 -0800
  Re: Origin of the story that K&R style was chosen to save paper Keith Thompson <kst-u@mib.org> - 2012-11-27 17:42 -0800
    Re: Origin of the story that K&R style was chosen to save paper Ian Collins <ian-news@hotmail.com> - 2012-11-28 14:51 +1300
    Re: Origin of the story that K&R style was chosen to save paper pete <pfiland@mindspring.com> - 2012-11-28 00:36 -0500
  Re: Origin of the story that K&R style was chosen to save paper Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-11-28 02:02 +0000
    Re: Origin of the story that K&R style was chosen to save paper Cal Dershowitz <cal@example.invalid> - 2012-11-27 20:30 -0700
      Re: Origin of the story that K&R style was chosen to save paper Cal Dershowitz <cal@example.invalid> - 2012-11-27 22:06 -0700
        Re: Origin of the story that K&R style was chosen to save paper Rosario1903 <Rosario@invalid.invalid> - 2012-11-28 08:58 +0100
          Re: Origin of the story that K&R style was chosen to save paper Cal Dershowitz <cal@example.invalid> - 2012-11-28 19:19 -0700
      Re: Origin of the story that K&R style was chosen to save paper Rui Maciel <rui.maciel@gmail.com> - 2012-11-28 11:10 +0000
        Re: Origin of the story that K&R style was chosen to save paper glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-11-28 18:19 +0000
          Re: Origin of the story that K&R style was chosen to save paper Robert Wessel <robertwessel2@yahoo.com> - 2012-11-28 13:14 -0600
            Re: Origin of the story that K&R style was chosen to save paper Robert Wessel <robertwessel2@yahoo.com> - 2012-11-28 13:26 -0600
              Re: Origin of the story that K&R style was chosen to save paper Robert Wessel <robertwessel2@yahoo.com> - 2012-11-28 13:30 -0600
                Re: Origin of the story that K&R style was chosen to save paper "BartC" <bc@freeuk.com> - 2012-11-28 19:38 +0000
                Re: Origin of the story that K&R style was chosen to save paper Anders Wegge Keller <wegge@wegge.dk> - 2012-11-28 21:03 +0100
                Re: Origin of the story that K&R style was chosen to save paper Robert Wessel <robertwessel2@yahoo.com> - 2012-11-28 14:27 -0600
            Re: Origin of the story that K&R style was chosen to save paper glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-11-28 21:50 +0000
  Re: Origin of the story that K&R style was chosen to save paper Rui Maciel <rui.maciel@gmail.com> - 2012-11-28 10:56 +0000
    Re: Origin of the story that K&R style was chosen to save paper Paul Sinnett <paul.sinnett@gmail.com> - 2012-11-28 03:55 -0800
      Re: Origin of the story that K&R style was chosen to save paper Jorgen Grahn <grahn+nntp@snipabacken.se> - 2012-11-28 21:37 +0000
    Re: Origin of the story that K&R style was chosen to save paper Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-11-28 14:19 +0000
    Re: Origin of the story that K&R style was chosen to save paper Tim Rentsch <txr@alumni.caltech.edu> - 2012-12-17 03:45 -0800
      Re: Origin of the story that K&R style was chosen to save paper Keith Thompson <kst-u@mib.org> - 2012-12-17 12:05 -0800
        Re: Origin of the story that K&R style was chosen to save paper Tim Rentsch <txr@alumni.caltech.edu> - 2012-12-20 10:06 -0800
          Re: Origin of the story that K&R style was chosen to save paper Keith Thompson <kst-u@mib.org> - 2012-12-20 14:26 -0800
            Re: Origin of the story that K&R style was chosen to save paper Tim Rentsch <txr@alumni.caltech.edu> - 2012-12-21 09:29 -0800
  Re: Origin of the story that K&R style was chosen to save paper Tim Rentsch <txr@alumni.caltech.edu> - 2012-12-17 03:39 -0800
    Re: Origin of the story that K&R style was chosen to save paper Paul Sinnett <paul.sinnett@gmail.com> - 2012-12-25 21:18 -0800

csiph-web