Trait (computer science)

From Seo Wiki - Search Engine Optimization and Programming Languages
Jump to navigationJump to search

In computer programming, a trait is an collection of methods, used as a "simple conceptual model for structuring object oriented programs".[1] Traits are similar to mixins, but whereas mixins can be composed only using the inheritance operation, traits offer a much wider selection of operations, including symmetric sum, method exclusion, and aliasing. A Trait differs from a abstract type in that it provides implementations of its methods, not just type signatures.

Traits are supported as a native language feature in the Fortress programming language (where they also play the role of types), in the Scala programming language, [2] [3] the Squeak version of Smalltalk from version 3.9, and in Perl 6 (which calls them "roles"), as an add-on by the Moose module for Perl 5 and the Joose framework for JavaScript, and have been proposed for inclusion in PHP and ActionScript 3.0. Module mixins in Ruby are similar to traits to some degree.

Traits were initially developed at the Software Composition Group, University of Berne.[4]

External links

References

Template:Type-theory-stub

es:Trait fr:Trait (type abstrait) pl:Cecha (programowanie obiektowe) ru:Типаж (абстрактный тип)

If you like SEOmastering Site, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...