کد مقاله کد نشریه سال انتشار مقاله انگلیسی نسخه تمام متن
418235 681624 2009 19 صفحه PDF دانلود رایگان
عنوان انگلیسی مقاله ISI
Traits at work: The design of a new trait-based stream library
موضوعات مرتبط
مهندسی و علوم پایه مهندسی کامپیوتر نظریه محاسباتی و ریاضیات
پیش نمایش صفحه اول مقاله
Traits at work: The design of a new trait-based stream library
چکیده انگلیسی

Recent years saw the development of a composition mechanism called traits. Traits are pure units of behavior that can be composed to form classes or other traits. The trait composition mechanism is an alternative to multiple or mixin inheritance in which the composer has full control over the trait composition.To evaluate the expressiveness of traits, some hierarchies were refactored, showing code reuse. However, such large refactorings, while valuable, may not exhibit all possible composition problems, since the hierarchies were previously expressed using single inheritance and following certain patterns.This paper presents our work on designing and implementing a new trait-based stream library named Nile. It evaluates how far traits enable reuse, what problems can be encountered when building a library using traits from scratch and compares the traits solution to alternative composition mechanisms. Nile's core allows the definition of compact collection and file streaming libraries as well as the implementation of a backward-compatible new stream library. Nile method size shows a reduction of 40% compared to the Squeak equivalent. The possibility to reuse the same set of traits to implement two distinct libraries is a concrete illustration of trait reuse capability.

ناشر
Database: Elsevier - ScienceDirect (ساینس دایرکت)
Journal: Computer Languages, Systems & Structures - Volume 35, Issue 1, April 2009, Pages 2–20
نویسندگان
, , ,