• 关于

    我是生活在上海的一名程序员,这里是我的主页空间,用来记录我的生活历程、学习笔记和点滴思考。  

  • 栏目

  • 日历

    September 2010
    M T W T F S S
    « Mar    
     12345
    6789101112
    13141516171819
    20212223242526
    27282930  

links for 2009-03-05

  • a book for those who already know something about the subject and want to be reminded of how all the jigsaw pieces fit together. And it is a priceless window into the mind of one of the major players in present-day cosmology.
    (tags: physics cosmos)
  • Kindle 2 解析
    (tags: media kindle)
  • 信使杂志又复刊了呀。才知道。
  • Inheritance is well-known and accepted as a mechanism for reuse in object-oriented languages.
    Unfortunately, due to the coarse granularity of inheritance, it may be difficult to decompose an
    application into an optimal class hierarchy that maximizes software reuse. Existing schemes based
    on single inheritance, multiple inheritance, or mixins, all pose numerous problems for reuse. To
    overcome these problems we propose traits, pure units of reuse consisting only of methods. We
    develop a formal model of traits that establishes how traits can be composed, either to form other
    traits, or to form classes. We also outline an experimental validation in which we apply traits to
    refactor a non-trivial application into composable units.
  • 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.
Printed from: http://www.mingli-yuan.info/archives/337 .
© Mingli Yuan 2010.

Leave a Comment