Re: ns-3 coding style (issue165087)

3 views
Skip to first unread message

gjcar...@gmail.com

unread,
Dec 8, 2009, 6:23:01 AM12/8/09
to tomh...@gmail.com, anh...@gmail.com, ns-3-r...@googlegroups.com, re...@codereview.appspotmail.com
A note about Python style...


http://codereview.appspot.com/165087/diff/1/3
File html_src/codingstyle.html (right):

http://codereview.appspot.com/165087/diff/1/3#newcode34
html_src/codingstyle.html:34: <p>In general, the Python code layout
follows the XXX.
Python style is given by PEP 8: http://www.python.org/dev/peps/pep-0008/

Yes, it is odd that python uses func(...) while NS-3 C++ uses func
(...), but PEP 8 is already a widely used standard, worth keeping...

http://codereview.appspot.com/165087

anh...@gmail.com

unread,
Dec 8, 2009, 5:34:01 AM12/8/09
to tomh...@gmail.com, ns-3-r...@googlegroups.com, re...@codereview.appspotmail.com

http://codereview.appspot.com/165087/diff/1/2
File html_src/code-submission.html (right):

http://codereview.appspot.com/165087/diff/1/2#newcode96
html_src/code-submission.html:96: with our codebase.
This is mostly a copy&paste from "General Guidelines" of
codingstyle.html.
Maybe is it better to just put a reference here?

http://codereview.appspot.com/165087/diff/1/2#newcode114
html_src/code-submission.html:114: <p> Maintainers should be free to ask
for rewrites of portions that modify
"to ask for" or "to be asked for"?
Sorry, if this is just my bad English.

http://codereview.appspot.com/165087/diff/1/3
File html_src/codingstyle.html (right):

http://codereview.appspot.com/165087/diff/1/3#newcode244
html_src/codingstyle.html:244: <p> XXX what to do about enum names? Use
or avoid the trailing _e?
Seems, that the existing codebase mostly avoids the trailing _e or E.
Most of the names of enums contain something like Type, Mode, Class,
Standard, State and thus it's generally clear, that a enum is
mentioned.
So +1 from me to avoid the trailing _e.

http://codereview.appspot.com/165087/diff/1/3#newcode478
html_src/codingstyle.html:478: <li> Doygen grouping may be used; an
example of this is the AODV module
s/Doygen/Doxygen/

http://codereview.appspot.com/165087
Reply all
Reply to author
Forward
0 new messages