Re: Nit pick -- where to stick the * in a C/C++ definition

Subject: Re: Nit pick -- where to stick the * in a C/C++ definition
From: Ben Kovitz <ben-kovitz -at- vertel -dot- com>
To: "TECHWR-L" <techwr-l -at- lists -dot- raycomm -dot- com>
Date: Sun, 04 Mar 2001 19:57:53 -0800

Guy Haas wrote:

>I am documenting an API in C++. I need to decide on a
>standard representation for pointer definitions.
>C and C++ themselves don't care whether I say:
>
> int * foo //centered
> int* foo //closed left
>or int *foo //closed right

Bjarne Stroustrup, inventor of C++, says that the closed left format is
truest to the spirit of C++. See:

http://www.research.att.com/~bs/bs_faq2.html#whitespace

He observes that C programmers tend to prefer the closed right format, but
the closed left format gives the proper emphasis to someone who is thinking
the way you're supposed to think as a C++ programmer. This is not easy to
explain; it's one of those things that you can only grok through a lot of
experience with the language, but then it's unmistakable.

--
Ben Kovitz
Author, Practical Software Requirements: A Manual of Content & Style
http://www.browsebooks.com/Kovitz/
http://www.amazon.com/exec/obidos/ASIN/1884777597


^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Develop HTML-Based Help with Macromedia Dreamweaver 4 ($100 STC Discount)
**New Dates!!** San Francisco (Apr 16-17), San Jose (Mar 29-30)
http://www.weisner.com/training/dreamweaver_help.htm or 800-646-9989.

IPCC 01, the IEEE International Professional Communication Conference,
October 24-27, 2001 at historic La Fonda in Santa Fe, New Mexico, USA.
CALL FOR PAPERS OPEN UNTIL MARCH 15. http://ieeepcs.org/2001/

---
You are currently subscribed to techwr-l as: archive -at- raycomm -dot- com
To unsubscribe send a blank email to leave-techwr-l-obscured -at- lists -dot- raycomm -dot- com
Send administrative questions to ejray -at- raycomm -dot- com -dot- Visit
http://www.raycomm.com/techwhirl/ for more resources and info.


Previous by Author: Techwriter/Techeditor Salary Differences
Next by Author: RE: Dreamweaver to create HTML Help? (Take II)
Previous by Thread: Nit pick -- where to stick the * in a C/C++ definition
Next by Thread: Re: Nit pick -- where to stick the * in a C/C++ definition


What this post helpful? Share it with friends and colleagues:


Sponsored Ads