This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
[using gcc book] ch10.11 Certain Changes We Don't Want to Make
- From: Chris Devers <cdevers at pobox dot com>
- To: GCC list <gcc at gcc dot gnu dot org>
- Date: Mon, 25 Aug 2003 23:53:06 -0400 (EDT)
- Subject: [using gcc book] ch10.11 Certain Changes We Don't Want to Make
- Reply-to: Chris Devers <cdevers at pobox dot com>
In section 10.11, "Certain Changes We Don't Want to Make"
we have the following paragraph:
* Warning when a non-void function value is ignored.
Coming as I do from a Lisp background, I balk at the idea that
there is something dangerous about discarding a value. There
are functions that return values which some callers may find
useful; it makes no sense to clutter the program with a cast
to void whenever the value isn't useful.
There's just a bit more axe-grinding from the MIT alum that wrote this
than is strictly necessary, I think :)
Coming from a non-Lisp background, as I assume many of the readers will
be, it's not clear to me what Lisp-wisdom is being alluded to here.
Moreover, the documentation guidelines I've been given to go by indicate
that the text should never be written in the first person like this, so
even if the Lisp sniping has to be in there, it has to be rewritten in
a more neutral 2nd or 3rd person voice.
Here's what I've got for a replacement:
Think carefully before discarding values. There are functions
that return values which some callers may find useful, but it
makes no sense to clutter the program with a cast to void
whenever the value isn't useful.
But even that is more "preachy" than I feel is appropriate.
Would anyone care to suggest improvements?
--
Chris Devers cdevers@pobox.com
lexical scope, n.
One of natural language's many risible barriers to disambiguation.
See also HYPHEN.
-- from _The Computer Contradictionary_, Stan Kelly-Bootle, 1995