This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
Re: C++STYLE
- To: "Phil Edwards" <pedwards at jaj dot com>
- Subject: Re: C++STYLE
- From: Steven King <sxking at uswest dot net>
- Date: Wed, 17 May 2000 08:50:08 -0700
- Cc: libstdc++ at sourceware dot cygnus dot com
- Organization: is the root of all evil
- References: <200005171539.LAA24054@jaj.com>
- Reply-To: sxking at uswest dot net
On Wed, 17 May 2000, Phil Edwards wrote:
> "The Standard," more formally known as *deep breath* International
> Standard 14882:1998, "Programming Lanaguages -- C++," from our friends at
> the International Standards Organization / Internation Electrotechnical
> Commission.
Oh, that 14882. Doh. Somehow I never quite connect the number with the
publication even tho I have it more or less as a permenant part of my desktop...
>
> Disclaimer: I haven't used Insight. What about the current format doesn't
> "work well" with gdb? I can debug the library inside dd pretty well.
More newlines would help. Primarily, putting braces and each statement on
separate lines so that one can set breakpoints, inspect data and single step
more or less in correspondence with sequence points in the execution. ie
void
foobar (sometype const &c)
{
do_something_to (c);
}
is preferrable to
void
foobar (sometype const &c)
{ do_something_to (c); }
since if you want to inspect the contents of c, the actual passed value isnt
visable until the execution has passed the opening brace and the stack frame
has been set up.
foobar () :
some_init (),
some_init2 (),
some_init3 ()
{
}
is preferable to
foobar () : some_init (), some_init2 (), some_init3 () {}
since one might want to step over some_init and step into some_init2.
--
Steven King
sxking@uswest.net