rfc:static-classes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
rfc:static-classes [2008/05/10 11:16] – Adding instance clarification (thanks, felipe) lstrojnyrfc:static-classes [2017/09/22 13:28] (current) – external edit 127.0.0.1
Line 40: Line 40:
 AbstractStaticClass2::staticMethod(); // Throws error, not allowed. Must be extended first AbstractStaticClass2::staticMethod(); // Throws error, not allowed. Must be extended first
 </code> </code>
 +
  
  
Line 53: Line 54:
   * The current behaviour of abstract classes/non-static classes with static members **would not** change. This is important for backwards compatibility   * The current behaviour of abstract classes/non-static classes with static members **would not** change. This is important for backwards compatibility
   * ''%%__setStatic()%%'' and ''%%__getStatic()%%'' **will** provide functionality similiar to ''%%__get()%%'' and ''%%__set()%%''   * ''%%__setStatic()%%'' and ''%%__getStatic()%%'' **will** provide functionality similiar to ''%%__get()%%'' and ''%%__set()%%''
-  * It **will not** be possible to create instances of static classes+  * Static classes **cannot** be instantiated 
 +  * Static classes **can** implement interfaces containing only static methods
  
 ===== Code ===== ===== Code =====
rfc/static-classes.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1