[OT] Re: Style Question
[OT] Re: Style Question
- Subject: [OT] Re: Style Question
- From: Steve Byan <email@hidden>
- Date: Mon, 30 Jun 2008 12:33:19 -0400
On Jun 28, 2008, at 1:25 AM, Jens Alfke wrote:
On 27 Jun '08, at 9:45 PM, Rob Ross wrote:
Btw, how many people realize this convention comes from the early
K&R C book, and the *only* reason they wrote it this way was to
minimize the number of lines of text their examples would take up
on each page? It's a type-setting design decision, and has nothing
to do with how "pure" a programmer you are.
Do you have any citation that shows that was their rationale? From
the forward of K&R:
"The position of braces is less important, although people hold
passionate beliefs. We have chosen one of several popular styles.
Pick a style that suits you, then use it consistently."
Ergo, it was already a popular coding style in 1978. Understandably
so, as a standard terminal fit even fewer lines (only 24) than did
a page of print, so minimizing the number of lines was important in
those days if you wanted to be able to see any amount of your code
at a time.
If you read the source of Unix 6th edition (available in Lion's
Commentary, ISBN 1-57398-013-7), you will see that they used the "One
True Brace Style(tm)" :-)
Best regards,
-Steve
--
Steve Byan <email@hidden>
Littleton, MA 01460
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden