WITCH colon


"pair", "name", "imposter", "aspect", "ditto", "mirror"
-- used to alias identifiers
-- used to create adverbs and pairs
-- used to control what is visible
-- everyone wants the colon

Used alone

: is not quite but almost the sigil for Pair objects
: after a identifier at a statement boundary creates a label as in common parlance
: after an identifier is an invocant marker for indirect object syntax

Operators containing this character

:: sigil and subset separator for packages (and consequently, types)
:() creates a Signature object and is used in closure parameters
:= aliases an identifier via runtime binding
::= aliases an identifier via compile time binding
.: dotted postfix form of prefix operator
.:: a class qualified method call
=:= container identity comparitor

When used inside regexes

: can apply adverbs (a.k.a. modifiers, like :i) to individual parts rather than the whole expression
: :? :! :: ::: used like a repeat count performs backtracking control
<::> inside extensible metasyntax denotes a symbolic indirect subrule

Special Variables

:: may often be seen after sigils with other special symbols but is only for scoping. Look in this section on the other characters' pages.

As an adverb

: introduces an adverbial Pair constructor which includes also radix in literal numbers.
If you have a short-form adverb you don't understand, see this section in the page for the character after the colon.

Other Uses

: after a parameter name in a Signature names the invocant
: creates named parameters in Signatures
: is before entries associated with dashed commondline arguments when using a MAIN subroutine
: for exportation, importation and versioning is just using traits, which are merely adverbs, but worth noting
: before a method name makes it a pair query method

Old, deprecated, or other language uses

? : the ternary operator from perl5 and other languages is ?? !! in perl6
: may not be used as a regexe delimiter as allowed in perl5