Documentation Set for Swarm 2.2
Prev | Appendix B. Library Interface Conventions | Next

# B.6. Interface Design Convention

A variety of rules on naming and declaration of object types, symbols, and messages are followed by many of the Swarm libraries. These rules help establish a basic consistency on the library interfaces. Following is a list of such conventions that apply to a public library interface, some but not all of which are derived from standard Smalltalk or Objective C coding practice:

- Names of global object constants are capitalized. In the public interface, such names include types and symbols.

- Recapitalization separates words of a compound name (e.g., GridTurtle). Underscores are generally not used.

- Message names start with a lower-case character, and are named using verbs. Nouns that represent gettable or settable components of object state (e.g., Direction of a GridTurtle), are prefixed by get or set to indicate the action being performed.

- The Smalltalk convention that a message return the receiver of a message if there is no other specific return value is generally *not* followed. If there is no specific return value needed from a message the return type is declared (void).

Prev | Home | Next
Global Object Symbols | Up | Documentation Structure