Created
June 7, 2016 01:45
Star
You must be signed in to star a gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Types have three functions in Perl 6. They provide value checks at runtime and | |
| if possible at compile time to allow meaningful error messages. If types are | |
| supplied, the multi disparcher can choose the right candidate to call. And | |
| lastly types make garentees reguarding the interface of a Perl 6 object or a | |
| native object provided by the NCI. | |
| There is a strong connection between the build in types and the type system | |
| itself. Any container that is not declared with a type will be typed as Any. | |
| Any in turn inherits methods from Mu. Together they provide the first round of | |
| methods for basic type conversions to Bool, Str and List. Introspection is | |
| also provided by Mu. As any container got a type the most basic functions like | |
| stringification, boolification, definedness and serialisation are guaranteed | |
| for any type defined by the setting and with the type declarators below. | |
| Foreign objects that are imported via the NCI may not do so. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment