From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: _Type vs no _Type
Date: Fri, 05 Nov 2010 18:52:03 -0400
Date: 2010-11-05T18:52:03-04:00 [thread overview]
Message-ID: <wccfwvf5qp8.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: ib1llq$8mp$1@tornado.tornevall.net
Jeffrey Carter <spam.jrcarter.not@spam.not.acm.org> writes:
> Not thinking about indentation is fine. It would also be fine if you
> never thought about type identifiers. But using _Type doesn't eliminate
> thinking about type identifiers, just thinking about /good/ type
> identifiers (the most important kind of thinking).
Well, you still have to think of something /good/ to go before
the "_Type".
> I disagree very strongly with the single-letter idea. Although I have
> seen plenty of single-letter parameter names, I have never seen a case
> where it was appropriate, or where a little thought couldn't come up
> with good names.
^^^^
But, you see, some folks, including me, think single-letter parameters
names ARE "good", in some cases. Here's an example (from the GNAT
sources, file sinfo.ads):
function Abort_Present (N : Node_Id) return Boolean;
The body of this function is short, so the single-letter "N"
doesn't get lost. What would you call it?
It could just as well be "Node" or (in Not-Ada) "node_id",
but that doesn't add any useful information to the reader
of the program, IMHO. And named notation doesn't make
sense for calls to Abort_Present, no matter what the
parameter name is.
What about operators? The Ada RM says:
function "+"(Left, Right: T) return T;
but I think that's just silly. I usually say:
function "+"(X, Y: T) return T;
Named notation never, ever, ever makes sense for operators.
And if the body of "+" is short, single-letter
names are crystal clear.
Verbosity is good when it imparts useful information to
the reader of the code, but not otherwise.
- Bob
next prev parent reply other threads:[~2010-11-05 22:52 UTC|newest]
Thread overview: 190+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-31 22:00 Beginners question: Compound types, how-to? Mart van de Wege
2010-10-31 22:36 ` Vinzent Hoefler
2010-10-31 23:27 ` Yannick Duchêne (Hibou57)
2010-11-01 7:14 ` Mart van de Wege
2010-11-01 19:22 ` Jeffrey Carter
2010-11-02 9:38 ` J-P. Rosen
2010-11-01 3:55 ` Jeffrey Carter
2010-11-01 7:12 ` Mart van de Wege
2010-11-01 15:04 ` Shark8
2010-11-01 17:06 ` Mart van de Wege
2010-11-01 17:39 ` Yannick Duchêne (Hibou57)
2010-11-01 17:58 ` Mart van de Wege
2010-11-01 19:19 ` Jeffrey Carter
2010-11-01 19:41 ` Yannick Duchêne (Hibou57)
2010-11-01 20:56 ` Jeffrey Carter
2010-11-01 21:05 ` Yannick Duchêne (Hibou57)
2010-11-03 16:56 ` Warren
2010-11-03 17:01 ` Georg Bauhaus
2010-11-03 17:42 ` Vinzent Hoefler
2010-11-04 5:23 ` Stephen Leake
2010-11-04 9:41 ` Georg Bauhaus
2010-11-06 16:49 ` Stephen Leake
2010-11-06 18:43 ` Jeffrey Carter
2010-11-06 19:35 ` Georg Bauhaus
2010-11-12 20:17 ` Randy Brukardt
2010-11-12 21:25 ` Jeffrey Carter
2010-11-04 10:09 ` Georg Bauhaus
2010-11-06 16:53 ` Stephen Leake
2010-11-06 19:24 ` Georg Bauhaus
2010-11-04 17:46 ` Jeffrey Carter
2010-11-03 20:38 ` Warren
2010-11-03 20:50 ` Yannick Duchêne (Hibou57)
2010-11-03 22:32 ` Georg Bauhaus
2010-11-04 13:59 ` Warren
2010-11-04 20:57 ` Martin
2010-11-05 20:43 ` Warren
2010-11-03 20:44 ` Yannick Duchêne (Hibou57)
2010-11-03 20:45 ` Yannick Duchêne (Hibou57)
2010-11-03 21:27 ` Simon Wright
2010-11-03 22:44 ` Georg Bauhaus
2010-11-04 1:19 ` Yannick Duchêne (Hibou57)
2010-11-04 5:18 ` Shark8
2010-11-04 6:30 ` Yannick Duchêne (Hibou57)
2010-11-04 14:23 ` Warren
2010-11-04 10:29 ` Georg Bauhaus
2010-11-04 11:06 ` Yannick Duchêne (Hibou57)
2010-11-04 12:56 ` Georg Bauhaus
2010-11-01 19:59 ` Shark8
2010-11-01 20:43 ` Yannick Duchêne (Hibou57)
2010-11-01 21:54 ` Shark8
2010-11-01 21:01 ` Jeffrey Carter
2010-11-01 21:49 ` Shark8
2010-11-02 0:07 ` Adam Beneschan
2010-11-02 8:17 ` Stephen Leake
2010-11-02 8:29 ` Yannick Duchêne (Hibou57)
2010-11-02 8:50 ` Dmitry A. Kazakov
2010-11-03 12:02 ` Searching for "_Type" discussions Stephen Leake
2010-11-02 19:02 ` Beginners question: Compound types, how-to? Jeffrey Carter
2010-11-02 19:22 ` Yannick Duchêne (Hibou57)
2010-11-02 20:24 ` Simon Wright
2010-11-03 12:14 ` _Type vs no _Type Stephen Leake
2010-11-03 21:16 ` Yannick Duchêne (Hibou57)
2010-11-03 21:19 ` Yannick Duchêne (Hibou57)
2010-11-04 5:37 ` Stephen Leake
2010-11-04 5:29 ` Stephen Leake
2010-11-03 21:29 ` Simon Wright
2010-11-04 5:28 ` Nasser M. Abbasi
2010-11-04 6:06 ` Yannick Duchêne (Hibou57)
2010-11-04 6:40 ` Shark8
2010-11-05 17:49 ` Florian Weimer
2010-11-05 18:18 ` Georg Bauhaus
2010-11-04 18:29 ` Britt Snodgrass
2010-11-04 19:08 ` Nasser M. Abbasi
2010-11-04 19:47 ` Britt Snodgrass
2010-11-04 19:59 ` Simon Wright
2010-11-04 22:38 ` Yannick Duchêne (Hibou57)
2010-11-05 7:05 ` Florian Weimer
2010-11-05 8:48 ` Yannick Duchêne (Hibou57)
2010-11-05 16:01 ` Dmitry A. Kazakov
2010-11-05 19:26 ` Jeffrey Carter
2010-11-05 19:34 ` Dmitry A. Kazakov
2010-11-05 19:35 ` Florian Weimer
2010-11-05 20:08 ` Dmitry A. Kazakov
2010-11-05 20:14 ` Florian Weimer
2010-11-05 21:01 ` Dmitry A. Kazakov
2010-11-05 20:45 ` Warren
2010-11-05 22:59 ` Brian Drummond
2010-11-09 20:29 ` Warren
2010-11-05 21:37 ` Jeffrey Carter
2010-11-05 3:10 ` Georg Bauhaus
2010-11-05 6:54 ` J-P. Rosen
2010-11-05 16:39 ` Robert A Duff
2010-11-05 23:32 ` J-P. Rosen
2010-11-06 0:55 ` Yannick Duchêne (Hibou57)
2010-11-06 13:40 ` Simon Wright
2010-11-05 17:29 ` Robert A Duff
2010-11-05 19:28 ` Jeffrey Carter
2010-11-05 23:09 ` Robert A Duff
2010-11-06 0:44 ` Jeffrey Carter
2010-11-06 21:10 ` Robert A Duff
2010-11-07 0:01 ` Brian Drummond
2010-11-07 20:41 ` Jeffrey Carter
2010-11-07 21:03 ` Yannick Duchêne (Hibou57)
2010-11-05 6:49 ` J-P. Rosen
2010-11-05 7:05 ` Florian Weimer
2010-11-05 7:20 ` J-P. Rosen
2010-11-05 17:39 ` Florian Weimer
2010-11-05 18:08 ` Georg Bauhaus
2010-11-05 23:36 ` J-P. Rosen
2010-11-06 1:05 ` Yannick Duchêne (Hibou57)
2010-11-05 10:58 ` Georg Bauhaus
2010-11-05 16:31 ` Dmitry A. Kazakov
2010-11-05 17:38 ` Georg Bauhaus
2010-11-05 17:31 ` Florian Weimer
2010-11-05 18:02 ` Georg Bauhaus
2010-11-05 23:29 ` J-P. Rosen
2010-11-06 0:00 ` Robert A Duff
2010-11-06 0:12 ` Simon Wright
2010-11-06 11:34 ` J-P. Rosen
2010-11-06 0:01 ` Georg Bauhaus
2010-11-09 20:43 ` Warren
2010-11-05 17:24 ` Robert A Duff
2010-11-05 20:05 ` Vinzent Hoefler
2010-11-05 22:28 ` Robert A Duff
2010-11-04 17:40 ` Jeffrey Carter
2010-11-05 17:15 ` Robert A Duff
2010-11-05 19:24 ` Jeffrey Carter
2010-11-05 22:52 ` Robert A Duff [this message]
2010-11-06 0:40 ` Jeffrey Carter
2010-11-06 7:12 ` Dmitry A. Kazakov
2010-11-06 10:13 ` Yannick Duchêne (Hibou57)
2010-11-06 11:00 ` Georg Bauhaus
2010-11-06 11:35 ` Dmitry A. Kazakov
2010-11-06 13:34 ` Simon Wright
2010-11-06 14:53 ` Dmitry A. Kazakov
2010-11-06 20:52 ` Shark8
2010-11-06 21:58 ` Yannick Duchêne (Hibou57)
2010-11-07 2:57 ` Shark8
2010-11-07 3:12 ` Yannick Duchêne (Hibou57)
2010-11-07 6:37 ` J-P. Rosen
2010-11-06 17:10 ` (see below)
2010-11-06 22:08 ` Niklas Holsti
2010-11-06 22:24 ` Yannick Duchêne (Hibou57)
2010-11-06 0:42 ` Shark8
2010-11-06 13:24 ` Robert A Duff
2010-11-06 21:20 ` Shark8
2010-11-06 22:12 ` Yannick Duchêne (Hibou57)
2010-11-16 20:33 ` Randy Brukardt
2010-11-06 1:33 ` Yannick Duchêne (Hibou57)
2010-11-04 17:49 ` Jeffrey Carter
2010-11-02 20:38 ` Beginners question: Compound types, how-to? Jeffrey Carter
2010-11-02 20:59 ` Britt Snodgrass
2010-11-03 0:46 ` Georg Bauhaus
2010-11-03 1:59 ` Yannick Duchêne (Hibou57)
2010-11-03 12:59 ` Georg Bauhaus
2010-11-03 15:28 ` Georg Bauhaus
2010-11-03 8:58 ` Dmitry A. Kazakov
2010-11-03 12:31 ` Georg Bauhaus
2010-11-03 12:18 ` Stephen Leake
2010-11-03 13:12 ` Georg Bauhaus
2010-11-04 0:55 ` Yannick Duchêne (Hibou57)
2010-11-03 17:35 ` Vinzent Hoefler
2010-11-03 21:19 ` Simon Wright
2010-11-03 21:31 ` Vinzent Hoefler
2010-11-04 5:25 ` Stephen Leake
2010-11-04 17:47 ` Jeffrey Carter
2010-11-04 6:11 ` Yannick Duchêne (Hibou57)
2010-11-04 19:30 ` Vinzent Hoefler
2010-11-04 17:42 ` Jeffrey Carter
2010-11-03 12:06 ` Stephen Leake
2010-11-04 1:04 ` Yannick Duchêne (Hibou57)
2010-11-04 17:11 ` Jeffrey Carter
2010-11-04 13:47 ` Peter C. Chapin
2010-11-04 14:30 ` Warren
2010-11-01 17:24 ` Yannick Duchêne (Hibou57)
2010-11-01 21:31 ` Simon Wright
2010-11-01 19:05 ` Jeffrey Carter
2010-11-01 11:50 ` (see below)
2010-11-01 17:16 ` Yannick Duchêne (Hibou57)
2010-11-01 17:27 ` Georg Bauhaus
2010-11-01 17:41 ` Yannick Duchêne (Hibou57)
2010-11-01 17:55 ` Yannick Duchêne (Hibou57)
2010-11-01 18:12 ` Adam Beneschan
2010-11-01 19:25 ` Jeffrey Carter
2010-11-01 12:03 ` Brian Drummond
2010-11-01 12:17 ` Florian Weimer
2010-11-01 13:05 ` Mart van de Wege
2010-11-01 22:45 ` Brian Drummond
2010-11-01 23:17 ` Yannick Duchêne (Hibou57)
2010-11-02 8:32 ` Dmitry A. Kazakov
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox