[Ns-developers] Some comments on ns-3-mp

George Riley riley at ece.gatech.edu
Tue Jul 24 02:36:00 PDT 2007


Tom/Mathieu/Gustavo,

As I think you already know, I much prefer the tab-aligned
variable names as Emmanuelle coded; having said that,
we need to allow flexibility by the contributors to do what
they are comfortable with, unless it is completely horrible.
After all, we are trying to (and hoping for) many many people
contributing code; if we insist on aligned (or not aligned)
names, it seems to me to discourage contributor. Same goes
for spacing before/after parens and argument lists, and other
small formatting issues.

I admit to being the original author of the coding standard,
and have come to realize that it is probably "too specific".
How would everyone feel if I made another pass and toned it
down a bit?

Another possible solution is a "pretty printer" that takes
any contributed code and tries to massage it into a consistent
style for spacing, alignment, etc.  THoughts on that?

George

------------------------------------------------------------------------ 
--------------------
Dr. George F. Riley, Associate Professor
The School of Electrical and Computer Engineering at Georgia Tech
Atlanta, GA  30332-0765
(404)-894-4767
E-Mail: riley at ece.gatech.edu
Office: Klaus 3360 / GTL 005

ECE2040 Web Page: http://users.ece.gatech.edu/~riley/ece2040/

ECE3090 Web Page:
http://users.ece.gatech.edu/~riley/ece3090/




On Jul 24, 2007, at 5:48 AM, Tom Henderson wrote:

> Mathieu Lacage wrote:
>> hi emmanuelle,
>> On Sun, 2007-07-22 at 23:16 -0400, Emmanuelle Laprise wrote:
>>>> Sorry for nitpicking :P  but more style issues:
>>>>
>>>>  Backoff        m_backoff;
>>>>  Packet         m_currentPkt;
>>>>
>>>> Should be:
>>>>
>>>>  Backoff m_backoff;
>>>>  Packet m_currentPkt;
>>> Here I have to disagree. If your coding standard really says that  
>>> variables shouldn't be aligned, then I think that it should be  
>>> changed. Not aligning variables really reduces readability. What  
>>> is the disadvantage in aligning them?
>> I wanted to point out that what matters in a coding style is not the
>> details of alignment but the consistency of the alignement because  
>> this
>> is what allows you to think about the code rather than the alignment
>> (once you have gotten used to the style). In that specific case, I am
>> not offended by this slight change and I don't care at all about  
>> it but
>> I think that gustavo's point is valid: what matters is consistency.
>> Btw, did you know that blanket statements about the readability of a
>> specific coding style layout are the number one source of  
>> flamewars on
>> mailing lists ? ;-)
>
> My 2 cents is that this specific issue is model author's  
> discretion, so long as it is internally consistent within the same  
> file.
>
> Tom
>



More information about the Ns-developers mailing list