Design and coding rules

Revision as of 11:48, 10 August 2007 by Bertrand Meyer (Talk | contribs) (Creating page)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

EiffelStudio contributors should maintain a high standard of quality and consistency. Please make sure you are familiar with the following guidelines and observe them throughout.

EiffelStudio has been developed by many people over many years, during which the rules have evolved. You may encounter older code that does not fully comply with the rules. Eventually all EiffelStudio code should be in full compliance

General Eiffel style rules

The first rule is to apply the general Eiffel style guidelines systematically. You will find them in both the books Object-Oriented Software Construction, 2nd edition, and Eiffel: The Language. The OOSC chapter is available online.

Please be strict about applying these rules, paying special attention to:

  • Command-Query separation (a function should not have a verb as its name, and should not modify the state).
  • Names in general (separate elements by an underscore, as in turn_left, not with camelcase as in other languages).
  • Feature names (use standard names such as put, item, force etc. whenever applicable; do not overqualify, e.g. in a class VEHICLE use turn, not turn_vehicle; etc.)
  • Class names (upper-case and clear, e.g. LAND_VEHICLE).
  • Layout and indentation, spacing (space before opening parenthesis but not after, space after closing parenthesis but not before etc.).
  • Everything else explained in the OOSC chapter.

Naming EiffelStudio classes

Commenting EiffelStudio features

(These sections to be completed.)