(: Trait) 使[1][2]

特徴

編集

(1)(2)mixin

2000SmalltalkSqueak

(一)

(二)

(三)

unionintersection

(一)S = A + BT = B + AST

(二)X = B + CS = A + XT = A + B + CST[3]

structural type

/

(一)symmetric sum- 

(二)override / asymmetric sum- /

(三)alias- 

(四)exclusion- 


導入している言語

編集



Smalltalk -  Smalltalk  Squeak 使[4][5]Squeak Squeak  Pharo 

PHP - 5.4.0 [6]

Raku -Perl 5  Moose 

JavaScript  Joose 

Ruby mix[7] - Ruby 2.0 [8][9]

/

Racket - 

Curl - 

Swift - protocolextension[10]

Rust - Orphan ruleSchärli使

Rust使

脚注

編集


(一)^ Nathanael SchärliStéphane DucasseOscar NierstraszAndrew P. Black Traits: Composable Units of Behaviour. Proceedings of the European Conference on Object-Oriented Programming ECOOP. Lecture Notes in Computer Science 2743Springer-Verlag2003pp. 248-274

(二)^ Stéphane DucasseOscar NierstraszNathanael SchärliRoel WuytsAndrew P. Black : Traits: A mechanism for fine-grained reuse. ACM Trans. Program. Lang. Syst. 28(2): 331-388 (2006) 

(三)^ Schärli, Nathanael; Ducasse, Stéphane; Nierstrasz, Oscar; Black, Andrew P. (2003). Traits: Composable Units of Behaviour. Proceedings of the European Conference on Object-Oriented Programming (ECOOP).. Lecture Notes in Computer Science 2743: 248274. http://scg.unibe.ch/archive/papers/Scha03aTraits.pdf. 

(四)^ Nathanael Schärli, Stéphane Ducasse, Oscar Nierstrasz, and Andrew P. Black. Traits: Composable Units of Behavior. Technical Report -2, Institut für Informatik, Universität Bern, Switzerland, November 2002

(五)^ Andrew P. Black, Nathanael Schärli, and Stéphane Ducasse. Applying Traits to the Smalltalk Collection Hierarchy. Technical Report -2, Institut für Informatik, Universität Bern, Switzerland, November 2002

(六)^ Marr, Stefan. Request for Comments: Horizontal Reuse for PHP. The PHP.net wiki. The PHP Group. 2011131

(七)^ http://marc.info/?l=ruby-cvs&m=130685857122161

(八)^ http://www.rubyist.net/~matz/20100617.html

(九)^ https://ruby-trunk-changes.hatenablog.com/entry/20111003/ruby_trunk_changes_33379_33380

(十)^ Mixins and Traits in Swift 2.0. 2022210

(11)^ http://www.scala-lang.org/node/126 A Tour of Scala: Traits

(12)^ http://www.ibm.com/developerworks/java/library/j-scala04298.html The busy Java developer's guide to Scala: Of traits and behaviors

(13)^ http://docs.groovy-lang.org/next/html/documentation/core-traits.html Groovy Language Documentation

関連項目

編集

外部リンク

編集