Type detection: Difference between revisions

m
→‎{{header|Raku}}: update link to documentation
No edit summary
m (→‎{{header|Raku}}: update link to documentation)
Line 1,687:
Raku is a dynamic language that has gradual, duck typing. It provides introspection methods through its comprehensive MOP (Meta Object Protocol) making it easy to do type detection, subroutine signatures and multi-dispatch. Raku types have two general flavors: content types and container types. Different container types have varying restrictions on what sort of content they can contain and in return provide specialized methods to operate on those contents. Content types give the compiler hints on how to best handle the information, what storage requirements it may have, what operators will work with it, etc.
 
This is really a very broad and kind of hand-wavey overview of Raku types. For much more indepthin-depth coverage see [httphttps://designdocs.raku.org/S02type.html#Built-In_Data_Types| Raku Design Documents Synopsis S02: Bits and Pieces: Built-In Data Types]
 
<lang perl6>sub type ($t) { say $t.raku, "\tis type: ", $t.WHAT }
2,392

edits