Документация
HTML CSS PHP PERL другое

Section B.14.  Chapter 15, Objects

 
Previous
Table of Contents
Next

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
    Table of Contents
    Next
    © 2000- NIV