Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C Programming (http://www.velocityreviews.com/forums/f42-c-programming.html)
-   -   Origin of the story that K&R style was chosen to save paper (http://www.velocityreviews.com/forums/t954918-origin-of-the-story-that-k-and-r-style-was-chosen-to-save-paper.html)

Paul Sinnett 11-27-2012 10:13 PM

Origin of the story that K&R style was chosen to save paper
 
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?

Keith Thompson 11-28-2012 01:42 AM

Re: Origin of the story that K&R style was chosen to save paper
 
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?


A bit of Googling found a discussion at
<http://ubuntuforums.org/archive/index.php/t-891532.html> which
includees this comment from a bruce89, posted August 16th, 2008:

I wonder if people know there's a note in K&R which says "we're
doing it like this to save paper".

I don't know whether this is true; I don't remember seeing such a note.

--
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"

Ian Collins 11-28-2012 01:51 AM

Re: Origin of the story that K&R style was chosen to save paper
 
Keith Thompson wrote:
> 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?

>
> A bit of Googling found a discussion at
> <http://ubuntuforums.org/archive/index.php/t-891532.html> which
> includees this comment from a bruce89, posted August 16th, 2008:
>
> I wonder if people know there's a note in K&R which says "we're
> doing it like this to save paper".
>
> I don't know whether this is true; I don't remember seeing such a note.


The only style note I remember is "we have chosen one of several popular
styles" in K&R 1.

--
Ian Collins

Ben Bacarisse 11-28-2012 02:02 AM

Re: Origin of the story that K&R style was chosen to save paper
 
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?


I don't think there's anything to this story. For one thing, the same
style was widely used for programs in B long before C and the K&R book.

--
Ben.

Rosario1903 11-28-2012 07:58 AM

Re: Origin of the story that K&R style was chosen to save paper
 
On Tue, 27 Nov 2012 22:06:37 -0700, Cal Dershowitz wrote:
>On 11/27/2012 08:30 PM, Cal Dershowitz wrote:
>> On 11/27/2012 07:02 PM, Ben Bacarisse wrote:
>>> Paul Sinnett writes:


>> If there is any truth to it re K&R2, I'll contend it was in the table of
>> printf specifiers.

>
>IIRC, it doesn't even exist. Refer to sprintf.


it is fprintf()...

Rui Maciel 11-28-2012 10:56 AM

Re: Origin of the story that K&R style was chosen to save paper
 
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.


Rui Maciel

Rui Maciel 11-28-2012 11:10 AM

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

> If saving paper were a priority, no one would call sarah palin an author.


You'd be surprised with what this desire to save paper forces some editors
to do. For example, I was told that the style adopted for a table included
in the EN 1993-1 standard, which sacrificed pretty much any readability, was
due to economy reasons: someone wanted to reduce publishing costs by
avoiding having to print one or two extra pages on a 100-page document.


Rui Maciel

Paul Sinnett 11-28-2012 11:55 AM

Re: Origin of the story that K&R style was chosen to save paper
 
On Wednesday, 28 November 2012 10:56:27 UTC, Rui Maciel wrote:
> 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.


I think the implication of the assertion is that it was a poor style choice imposed by the publisher which has since made life hell for a generation or more of C programmers. I'm guessing this assertion was created as part of a flame war of some kind.

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.

Ben Bacarisse 11-28-2012 02:19 PM

Re: Origin of the story that K&R style was chosen to save paper
 
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.

glen herrmannsfeldt 11-28-2012 06:19 PM

Re: Origin of the story that K&R style was chosen to save paper
 
Rui Maciel <rui.maciel@gmail.com> wrote:
> Cal Dershowitz wrote:


>> If saving paper were a priority, no one would call sarah palin an author.


> You'd be surprised with what this desire to save paper forces some editors
> to do. For example, I was told that the style adopted for a table included
> in the EN 1993-1 standard, which sacrificed pretty much any readability, was
> due to economy reasons: someone wanted to reduce publishing costs by
> avoiding having to print one or two extra pages on a 100-page document.


I don't know specific numbers, but printing likes certain page counts
better than others. It might be that the choice was 100 or 120 pages.

If you look at a book from the end, you will see that pages come in
little groups, making it hard to add just one or two pages.

And you know we all want to keep the cost of standards documents down.

-- glen


All times are GMT. The time now is 09:02 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.