Saturday, May 8, 2010

CamelCase convention

Name encoding in ns-3 should follow the CamelCase convention where words are joined without spaces and are capitalized. For example: "My computer" is transformed into MyComputer. Do not use all capital letters such as MAC or PHY, but choose instead Mac or Phy. A goal of CamelCase convention is to ensure that the words which make up a name can be separated by the eye.

Variable names should follow a slight variation on the base CamelCase convention: camelBack. For example, the variable "user name" would be named "userName". This variation on the basic naming pattern is used to allow a reader to distinguish a variable name from its type. For example, "UserName userName;" would be used to declare a variable named userName of type UserName.

-ns-3-wimax/doc/codingstd.txt

No comments:

Post a Comment