| ←Older revision | Revision as of 05:43, 30 October 2011 | ||
| Line 5: | Line 5: | ||
That is why I am thankful to authors of [http://www.cs.utah.edu/plt/publications/oopsla04-gff.pdf Super and Inner — Together at Last!] for explaining everything in the [[Java]] terminology and even finding ways to make these two worlds co-exist in piece. The paper also proposes new access modifier (which I called for in my [[ClarityOfAccessModifiers]] essay). It is named '''pubment''' and it is a perfectly fine (from [[API]] design perspective) combination of '''callable''' and '''slot''' which allows ''augmentation'': | That is why I am thankful to authors of [http://www.cs.utah.edu/plt/publications/oopsla04-gff.pdf Super and Inner — Together at Last!] for explaining everything in the [[Java]] terminology and even finding ways to make these two worlds co-exist in piece. The paper also proposes new access modifier (which I called for in my [[ClarityOfAccessModifiers]] essay). It is named '''pubment''' and it is a perfectly fine (from [[API]] design perspective) combination of '''callable''' and '''slot''' which allows ''augmentation'': | ||
| - | <source lang="java"> | + | <source lang="java" snippet="superinner.java"/> |
| - | + | <source lang="java" snippet="superinner.beta"/> | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
The paper also explains why '''inner''' is more suitable for [[API]] design. To quote: The overall philosophy of class extension in [[Java]]-like languages (using '''super''') is: ''subclass implementors know better''. The philosophy of class extension in [[Beta]]-like languages (with '''inner''') is: ''superclass implementors know better''. | The paper also explains why '''inner''' is more suitable for [[API]] design. To quote: The overall philosophy of class extension in [[Java]]-like languages (using '''super''') is: ''subclass implementors know better''. The philosophy of class extension in [[Beta]]-like languages (with '''inner''') is: ''superclass implementors know better''. | ||