Content deleted Content added
Stevebroshar (talk | contribs) Actually describe in short desc |
Add category |
||
Line 48:
=== Required methods ===
If a trait requires the consuming class to provide certain methods, the trait cannot know if those methods are [[Semantic_equivalence|semantically equivalent]] to the trait's needs. For some dynamic languages, such as Perl, the required method can only be identified by a method name, not a full [[Type signature|method signature]], making it harder to guarantee that the required method is appropriate.
=== Excluding methods ===
If a method is excluded from a trait, that method becomes a 'required' method for the trait because the trait's other methods might call it.
Line 214 ⟶ 212:
==See also==
* [[Extension method]]
* [[Interface (object-oriented programming)]]
Line 229 ⟶ 226:
[[Category:Programming language topics]]
[[Category:Type theory]]
[[Category:Articles with example C Sharp code]]
[[Category:Articles with example PHP code]]
[[Category:Articles with example Rust code]]
|