Trait (computer programming): Difference between revisions

Content deleted Content added
m Reverted edits by 120.21.5.252 (talk) to last version by Narky Blert
Line 47:
* [[C++]]: Used in [[Standard Template Library]] and the [[C++ standard library]] to support generic [[Container (data structure)|container classes]]<ref>{{cite web | url=http://www.sgi.com/tech/stl/iterator_traits.html | title=iterator_traits&lt;Iterator&gt; | website=Standard Template Library | publisher=SGI}}</ref><ref>{{cite magazine | url=http://www.cantrip.org/traits.html | title=Traits: a new and useful template technique | first=Nathan C. | last=Myers | magazine=C++ Report | date=June 1995 | access-date=January 23, 2016}}</ref> and in the [[Boost C++ Libraries|Boost]] TypeTraits library.<ref>{{cite web | url=http://www.boost.org/more/generic_programming.html#traits | title=Generic Programming Techniques: Traits | website=Boost C++ Libraries | first=David | last=Abrahams | access-date=January 23, 2016}}</ref>
* [[Curl (programming language)|Curl]]: Abstract classes as mixins permit method implementations and thus constitute traits by another name.{{citation needed|date=January 2016}}
* [[D (programming language)|D]]: Since version 2.003, the __traits language extension<ref>{{cite web | url=http://dlang.org/traits.html | title=Traits | website=The D Language Reference | publisher=Digital Mars | access-date=January 23, 2016}}</ref> and std.traits module<ref>{{cite web | url=http://dlang.org/phobos/std_traits.html | title=std.traits | website=The D Language — Library Reference | publisher=Digital Mars | access-date=January 23, 2016}}</ref> helper templates provide compile-time traits. Together with other language features (notably templates and mixins), they allow flexible automatic generation of methods based on interfaces and types. D also allows explicit aliasing of member methods and variables, including forwarding to multiple member classes.<ref>{{cite web | url=http://dlang.org/class.html#AliasThis | title=Classes | website=The D Language Reference | publisher=Digital Mars | access-date=January 23, 2016}}</ref> fun fact I was told all this info
* [[Fortress (programming language)|Fortress]]<ref>{{cite web | url=http://stephane.ducasse.free.fr/Teaching/CoursAnnecy/0506-Master/ForPresentations/Fortress-PLDITutorialSlides9Jun2006.pdf | title=Fortress Programming Language Tutorial | first1=Guy | last1=Steele | first2=Jan-Willem | last2=Maessen | publisher=Sun Microsystems | date=June 11, 2006 | access-date=January 23, 2016}}</ref>
* [[Groovy (programming language)|Groovy]]: Since version 2.3<ref>{{cite web | url=http://www.groovy-lang.org/objectorientation.html#_traits | title=Object Orientation: Traits | website=The Groovy Programming Language | access-date=January 23, 2016}}</ref>