Are you blogging on PH? Get your free blog.
*/
*/

Elements of Programming Style

Theme Graphic
Theme Graphic

Software Tools in Turbo Pascal

I intend to go through SOFTWARE TOOLS IN PASCAL by Kernighan & Plauger and to re-write the programs they presented using Turbo Pascal, taking advantage of Turbo Pascal's improvements over the...

Subscribe

Author

Archive

Tags

Posted on Monday, December 03, 2007 at 11:43 AM

Elements of Programming Style

I've always recommended that programmers make it a point to read this classic by Kernighan and Plauger. I'm now in the process of reading it again. I had to request an interlibrary load to get it.

Upon re-reading it (I'm now up to chapter 3) I find it terribly dated. The examples are all in Fortran and PL/1 (PL/I?). One of the "rules" set forth is "avoid the Fortran arithmetic IF," a good piece of advise if you happen to be programming in Fortran but of little use if you are using C++ or Pascal.

The first chapters of the book seem to deal almost exclusively with when and when not to use GOTO and how to use it when you do. Again advise aimed at Fortran programmers who, lacking WHILE and IF..THEN..ELSE, had no choice but to use GOTO, and at PL/1 programs who could avoid the GOTO but often didn't, producing "Fortran with semicolons."

I think the book is still worth a read but I'm not so sure it is still a MUST READ. An updated version with examples in C++, Java and/or Pascal would be good but it's something I doubt the authors would be interested in doing. The very fact that the book seems dated is an indication that the authors accomplished their mission.

Tags: Kernighan, Style, Plauger, GOTO Views:228

1 comments on "Elements of Programming Style"
Posted by ghr on on Thursday, December 27, 2007 at 5:19 AM
Image Of Author
Software Tools in Pascal - general comment
Interesting ! I did this almost twenty years ago one of my drives was to write portable Pascal code. So I did not care about any TP-friendly stuff but kept pretty close to the original and that payed off with ports to a.o. VAX & unix. In a way this resembles the C approach, only this time you have to do it yourself. Your comments make sense though, I also stumbled on some of these issues (e.g., always make sure that a textfile has a CRLF before its EOF).

Leave A Comment
Subject:


Comment:
   Bold Italic Underline          Code Link Image Horizontal Rule


Because you do not have or are not logged in to your Programmer's Heaven account, please enter your name.

Name:


To help prevent comment SPAM, please enter the magic code '211' in the box:




Posting Rules
Please follow these rules when posting comments on blog posts.
  • Do not post anything that is racist, hate speech or of a sexual or adult nature.
  • Do not post or link to anything that infringes copyrighted laws.
  • Posting about security or legal topics is fine so long as you are not glorifying or encouraging people to perform illegal activities.
  • Both the author of this blog and the Programmer's Heaven administrators may delete any inappropriate comments without notice at their own discretion.

corner
© 1996-2008 CommunityHeaven LLC. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
North American business development: Nicolai Wadstrom. Publisher: Lars Hagelin.
Resource Listings