|
ABSTRACT
Traits are a programming language technology that promote the reuse of methods between unrelated classes. This paper reports on a refactoring of the Smalltalk collections classes using traits. The original collection classes contained much duplication of code; traits let us remove all of it. We also found places where the protocols of the collections lacked uniformity; traits allowed us to correct these non-uniformities without code duplication.Traits also make it possible to reuse fragments of collection code outside of the existing hierarchy; for example, they make it easy to convert other collection-like things into true collections. Our refactoring reduced the number of methods in the collection classes by approximately 10 per cent. More importantly, understandability maintainability and reusability of the code were significantly improved.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
1
|
|
| |
2
|
|
 |
3
|
Andrew Black , Norman Hutchinson , Eric Jul , Henry Levy, Object structure in the Emerald system, Conference proceedings on Object-oriented programming systems, languages and applications, p.78-86, September 29-October 02, 1986, Portland, Oregon, United States
|
| |
4
|
|
| |
5
|
Andrew P. Black and Mark~P. Jones. Perspectives on software. In OOPSLA 2000 Workshop on Advanced Separation of Concerns in Object-oriented Systems, 2000.
|
| |
6
|
|
 |
7
|
|
| |
8
|
|
| |
9
|
Eduardo Casais. Managing Evolution in Object Oriented Environments: An Algorithmic Approach. Ph.D. thesis, Centre Universitaire d'Informatique, University of Geneva, May 1991.
|
| |
10
|
|
 |
11
|
William R. Cook, Interfaces and specifications for the Smalltalk-80 collection classes, conference proceedings on Object-oriented programming systems, languages, and applications, p.1-15, October 18-22, 1992, Vancouver, British Columbia, Canada
|
 |
12
|
H. Dicky , C. Dony , M. Huchard , T. Libourel, On automatic class insertion with overloading, Proceedings of the 11th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, p.251-267, October 06-10, 1996, San Jose, California, United States
|
| |
13
|
|
| |
14
|
|
 |
15
|
Matthew Flatt , Shriram Krishnamurthi , Matthias Felleisen, Classes and mixins, Proceedings of the 25th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.171-183, January 19-21, 1998, San Diego, California, United States
[doi> 10.1145/268946.268961]
|
| |
16
|
|
| |
17
|
|
| |
18
|
|
| |
19
|
John V. Guttag, James J. Horning, and Jeannette M. Wing. The larch family of specification languages. IEEE Transactions on Software Engineering, 2(5):24--36, September 1985.
|
| |
20
|
Andrew Hunt and David Thomas. The Pragmatic Programmer. Addison Wesley, 2000.
|
| |
21
|
|
| |
22
|
|
| |
23
|
Yahya H. Mirza. A Compositional Component Collections Framework. Seventh International Workshop on Component-Oriented Programming (WCOP 2002) at ECOOP 2002, Malaga, Spain, June 2002.
|
 |
24
|
Ivan Moore, Automatic inheritance hierarchy restructuring and method refactoring, Proceedings of the 11th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, p.235-250, October 06-10, 1996, San Jose, California, United States
|
| |
25
|
|
 |
26
|
|
| |
27
|
|
| |
28
|
Nathanael Schärli and Andrew Black. A browser for incremental programming. Technical Report CSE-03-008, OGI School of Science & Engineering, Beaverton, Oregon, USA, April 2003.
|
| |
29
|
Nathanael Schärli, Oscar Nierstrasz, Stéphane Ducasse, Roel Wuyts, and Andrew Black. Traits: The formal model. Technical Report IAM-02-006, Institut für Informatik, Universität Bern, Switzerland, November 2002. Also available as Technical Report CSE-02-013, OGI School of Science & Engineering, Beaverton, Oregon, USA.
|
 |
30
|
|
| |
31
|
Sander Tichelaar, Stéphane Ducasse, Serge Demeyer, and Oscar Nierstrasz. A meta-model for language-independent refactoring. In Proceedings ISPSE 2000, pages 157--167. IEEE, 2000.
|
| |
32
|
Lance Tokuda and Don Batory. Automating three modes of evolution for object-oriented software architecture. In Proceedings COOTS '99, May 1999.
|
 |
33
|
|
CITED BY 12
|
|
Emerson R. Murphy-Hill , Andrew P. Black, Traits: experience with a language feature, Companion to the 19th annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications, October 24-28, 2004, Vancouver, BC, CANADA
|
|
|
Philip J. Quitslund , Emerson R. Murphy-Hill , Andrew P. Black, Supporting Java traits in Eclipse, Proceedings of the 2004 OOPSLA workshop on eclipse technology eXchange, p.37-41, October 24-24, 2004, Vancouver, British Columbia, Canada
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Emerson R. Murphy-Hill , Philip J. Quitslund , Andrew P. Black, Removing duplication from java.io: a case study using traits, Companion to the 20th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, October 16-20, 2005, San Diego, CA, USA
|
|
|
|
|
|
|
|
|
|
|
|
Alexandre Bergel , Stéphane Ducasse , Oscar Nierstrasz , Roel Wuyts, Stateful traits and their formalization, Computer Languages, Systems and Structures, v.34 n.2-3, p.83-108, July, 2008
|
|
|
|
REVIEW
"Chenglie Hu : Reviewer"
A refactoring process centered about the Smalltalk collection classes is considered in this paper. The process uses traits: fine-grained units to support code reuse. First, the trait construct is introduced as a class that contains purely be
more...
|