All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC]: field name identifier conventions
@ 2007-10-20 15:54 Gerrit Renker
  2007-10-20 21:03 ` Arnaldo Carvalho de Melo
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Gerrit Renker @ 2007-10-20 15:54 UTC (permalink / raw)
  To: dccp

I have a question/suggestion for DCCP/CCID field names, which have a tendency to grow
into really_quite_long_strings. The convention for field members seems to be


	"x"->"x"_<fieldname>

Examples are in particular

   * hctx->ccid2hctx_<fieldname>
   * hcrx->ccid3hcrx_<fieldname>
   * avr->dccpavr_<fieldname>
   * av->dccpav_<fieldname>

The problem is that this naming convention has no apparent benefits: 
  
  * which struct is used is evident from the context and need not be encoded
  * someone reading the code is only interested in the fieldnames
  * with the line length limit of 80 characters this convention almost inevitably leads to
    multi-line expression for even the simplest kinds of comparisons and expressions.

Hence my suggestion is to reduce the replicated "x" field prefix, so that field members become
shorter, as will be expressions, and the code would be easier to read.

What is the opinion of other developers / maintainer regarding this? 



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-10-22 14:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-20 15:54 [RFC]: field name identifier conventions Gerrit Renker
2007-10-20 21:03 ` Arnaldo Carvalho de Melo
2007-10-20 21:08 ` Arnaldo Carvalho de Melo
2007-10-21  1:56 ` Ian McDonald
2007-10-21  2:54 ` Łeandro Sales
2007-10-22 11:20 ` Tommi Saviranta
2007-10-22 14:50 ` Gerrit Renker

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.