Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #28698 > unrolled thread
| Started by | Paul Sinnett <paul.sinnett@gmail.com> |
|---|---|
| First post | 2012-11-27 14:13 -0800 |
| Last post | 2012-12-25 21:18 -0800 |
| Articles | 9 on this page of 29 — 14 participants |
Back to article view | Back to comp.lang.c
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
Page 2 of 2 — ← Prev page 1 [2]
| From | Jorgen Grahn <grahn+nntp@snipabacken.se> |
|---|---|
| Date | 2012-11-28 21:37 +0000 |
| Message-ID | <slrnkbd10g.1jc.grahn+nntp@frailea.sa.invalid> |
| In reply to | #28727 |
On Wed, 2012-11-28, Paul Sinnett wrote: ... > But I've found nothing to back it up other than vague references > that don't appear to exist in reality. From what I can tell K&R had a > free choice of style and just happened to choose a popular one at the > time. I cannot help thinking maximizing what you could read on a vt100 (or whatever terminal these guys were using) had something to do with it, too. It's *still* a reason I use it, and I'm on a fancy 1920x1200 display; my Emacs is 90 lines high. /Jorgen -- // Jorgen Grahn <grahn@ Oo o. . . \X/ snipabacken.se> O o .
[toc] | [prev] | [next] | [standalone]
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Date | 2012-11-28 14:19 +0000 |
| Message-ID | <0.abd1decbd6e2746f17a9.20121128141942GMT.87r4ndu7wh.fsf@bsb.me.uk> |
| In reply to | #28725 |
Rui Maciel <rui.maciel@gmail.com> writes: <snip> > 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. Maybe one can say that book length will always be the reason a terse style is not rejected, but it won't always be the reason it's chosen. -- Ben.
[toc] | [prev] | [next] | [standalone]
| From | Tim Rentsch <txr@alumni.caltech.edu> |
|---|---|
| Date | 2012-12-17 03:45 -0800 |
| Message-ID | <kfnd2y8j41s.fsf@x-alumni2.alumni.caltech.edu> |
| In reply to | #28725 |
Rui Maciel <rui.maciel@gmail.com> writes: > Paul Sinnett wrote: > >> I've been told by several people that the reason the K&R style was chosen >> for the C Programming Language book was because the publisher wanted to >> reduce the length of the book. But I've been unable to find any >> authoritative source for the story. > > I don't know if that's true or not, but you will be hard-pressed to find a > single book publisher that doesn't want to reduce the length of the books > they publish. I personally know of a case where a book publisher pressed > the author of a technical book to edit down a 400-ish page draft to fit in a > glossy 200-page publication. > > 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.
[toc] | [prev] | [next] | [standalone]
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Date | 2012-12-17 12:05 -0800 |
| Message-ID | <lnbodsigvp.fsf@nuthaus.mib.org> |
| In reply to | #29395 |
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.
--
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"
[toc] | [prev] | [next] | [standalone]
| From | Tim Rentsch <txr@alumni.caltech.edu> |
|---|---|
| Date | 2012-12-20 10:06 -0800 |
| Message-ID | <kfna9t8fvit.fsf@x-alumni2.alumni.caltech.edu> |
| In reply to | #29419 |
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.
[toc] | [prev] | [next] | [standalone]
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Date | 2012-12-20 14:26 -0800 |
| Message-ID | <lnehikqs0u.fsf@nuthaus.mib.org> |
| In reply to | #29530 |
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"
[toc] | [prev] | [next] | [standalone]
| From | Tim Rentsch <txr@alumni.caltech.edu> |
|---|---|
| Date | 2012-12-21 09:29 -0800 |
| Message-ID | <kfnpq235n67.fsf@x-alumni2.alumni.caltech.edu> |
| In reply to | #29552 |
Keith Thompson <kst-u@mib.org> writes: > 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. Me too, and me too. :) > 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). [snip elaboration] Possibly, but I don't think it happened. The point of my earlier remark was to undercut one of the arguments that it "likely could have happened" (my paraphrase), because the current evidence is that the putattive editorial pressure for changing bracing style is at best small, and may even be zero. In the absence of any evidence suggesting that it did happen, and considering the presence of evidence that the story is just folklore, ISTM the most sensible conclusion is just that: it didn't happen, and is only folklore. That isn't meant to be an argument, just a statement of my personal assessment.
[toc] | [prev] | [next] | [standalone]
| From | Tim Rentsch <txr@alumni.caltech.edu> |
|---|---|
| Date | 2012-12-17 03:39 -0800 |
| Message-ID | <kfnhankj4ao.fsf@x-alumni2.alumni.caltech.edu> |
| In reply to | #28698 |
Paul Sinnett <paul.sinnett@gmail.com> writes:
> I've been told by several people that the reason the K&R style was
> chosen for the C Programming Language book was because the publisher
> wanted to reduce the length of the book. But I've been unable to find
> any authoritative source for the story. Does anyone know where this
> idea comes from? An interview maybe?
Folklore. A sample quote:
Regarding brace placement: I like to spread the rumor that
K&R originally prefered the more spread out layout but were
coerced into the more compact layout by their book publisher
in order to save paper.
Several web searches turned up only a handful of references (the
quote above is from the 2006-05-19 set of postings). The last
item on the list is this very thread!
1992-11-06 https://groups.google.com/group/comp.lang.c/tree/browse_frm/month/1992-11/6b16ccb2c46b639e?rnum=181&lnk=ol&hl=pt
2004-11-01 https://forums.oracle.com/forums/thread.jspa?threadID=1558584
2005-05-24 http://compgroups.net/comp.programming/commenting-style-question/549175
2006-05-19 http://forum.beyond3d.com/showthread.php?t=30892&page=2
2007-07-07 http://java-knowledge.developerfaqs.com/q_java-tech_80214.html
2009-09-14 http://www.linuxquestions.org/questions/programming-9/programming-philosophy-363010/
2012-11-27 http://www.velocityreviews.com/forums/t954918-origin-of-the-story-that-k-and-r-style-was-chosen-to-save-paper.html
[toc] | [prev] | [next] | [standalone]
| From | Paul Sinnett <paul.sinnett@gmail.com> |
|---|---|
| Date | 2012-12-25 21:18 -0800 |
| Message-ID | <dbc3049b-1912-4fcd-a3a8-594c9414fb0b@googlegroups.com> |
| In reply to | #29393 |
On Monday, 17 December 2012 11:39:43 UTC, Tim Rentsch wrote: > Folklore. A sample quote: > > Regarding brace placement: I like to spread the rumor that > K&R originally prefered the more spread out layout but were > coerced into the more compact layout by their book publisher > in order to save paper. I guess that would explain it. The little prankster...
[toc] | [prev] | [standalone]
Page 2 of 2 — ← Prev page 1 [2]
Back to top | Article view | comp.lang.c
csiph-web