Previous Page
Next Page

B.14. Chapter 15, Objects

  • Make object orientation a choice, not a default. [Using OO]

  • Choose object orientation using appropriate criteria. [Criteria]

  • Don't use pseudohashes. [Pseudohashes]

  • Don't use restricted hashes. [Restricted Hashes]

  • Always use fully encapsulated objects. [Encapsulation]

  • Give every constructor the same standard name. [Constructors]

  • Don't let a constructor clone objects. [Cloning]

  • Always provide a destructor for every inside-out class. [Destructors]

  • When creating methods, follow the general guidelines for subroutines. [Methods]

  • Provide separate read and write accessors. [Accessors]

  • Don't use lvalue accessors. [Lvalue Accessors]

  • Don't use the indirect object syntax. [Indirect Objects]

  • Provide an optimal interface, rather than a minimal one. [Class Interfaces]

  • Overload only the isomorphic operators of algebraic classes. [Operator Overloading]

  • Always consider overloading the boolean, numeric, and string coercions of objects. [Coercions]

    Previous Page
    Next Page