E
E. Robert Tisdale
C++ Programming Style Guidelines
http://geosoft.no/development/cppstyle.html
I think that these guidelines are almost *all* wrong.
For example:
11. Private class variables should have underscore suffix.
class SomeClass {
private:
int length_;
}
12. Generic variables should have the same name as their type.
void setTopic (Topic *topic)
// NOT: void setTopic (Topic *value)
// NOT: void setTopic (Topic *aTopic)
// NOT: void setTopic (Topic *x)
void connect (Database *database)
// NOT: void connect (Database *db)
// NOT: void connect (Database *oracleDB)
7. The terms get/set must be used
where an attribute is accessed directly.
employee.getName(); matrix.getElement (2, 4);
employee.setName (name); matrix.setElement (2, 4, value);
http://geosoft.no/development/cppstyle.html
I think that these guidelines are almost *all* wrong.
For example:
11. Private class variables should have underscore suffix.
class SomeClass {
private:
int length_;
}
12. Generic variables should have the same name as their type.
void setTopic (Topic *topic)
// NOT: void setTopic (Topic *value)
// NOT: void setTopic (Topic *aTopic)
// NOT: void setTopic (Topic *x)
void connect (Database *database)
// NOT: void connect (Database *db)
// NOT: void connect (Database *oracleDB)
7. The terms get/set must be used
where an attribute is accessed directly.
employee.getName(); matrix.getElement (2, 4);
employee.setName (name); matrix.setElement (2, 4, value);