This listing explains the usage of every Pony keyword.

    KeywordUsage
    actordefines an actor
    asconversion of a value to another Type (can raise an error)
    bebehavior, executed asynchronously
    boxdefault reference capability – object is readable, but not writable
    breakto step out of a loop statement
    classdefines a class
    compile_errorwill provoke a compile error
    compile_intrinsicimplementation is written in C and not available as Pony code
    continuecontinues a loop with the next iteration
    consumemove a value to a new variable, leaving the original variable empty
    digestofcreate a USize value that summarizes the Pony object, similar to a Java object’s hashCode() value.
    doloop statement, or after a with statement
    elseconditional statement in if, for, while, repeat, try (as a catch block), match
    elseifconditional statement, also used with ifdef
    embedembed a class as a field of another class
    endending of: if then, ifdef, while do, for in, repeat until, try, object, lambda, recover, match
    errorraises an error
    forloop statement
    fundefine a function, executed synchronously
    if(1) conditional statement
    (2) to define a guard in a pattern match
    ifdefwhen defining a build flag at compile time: ponyc –D “foo”
    iftypetype conditional statement iftype A <: B checks if A is a subtype of B
    inused in a for in - loop statement
    interfaceused in structural subtyping
    is(1) used in nominal subtyping
    (2) in type aliasing
    (3) identity comparison
    isntnegative identity comparison
    isoreference capability – read and write uniqueness
    lambdato make a closure
    letdeclaration of immutable variable: you can’t rebind this name to a new value
    matchpattern matching
    newconstructor
    notlogical negation
    objectto make an object literal
    primitivedeclares a primitive type
    recoverremoves the reference capability of a variable
    refreference capability – object (on which function is called) is mutable
    repeatloop statement
    returnto return early from a function
    tagreference capability – neither readable nor writeable, only object identity
    then(1) in if conditional statement
    (2) as a (finally) block in try
    thisthe current object
    traitused in nominal subtyping: class Foo is TraitName
    trnreference capability – write uniqueness, no other actor can write to the object
    tryerror handling
    typeto declare a type alias
    untilloop statement
    use(1) using a package
    (2) using an external library foo: use “lib:foo”
    (3) declaration of an FFI signature
    (4) add a search path for external libraries: use “path:/usr/local/lib”
    vardeclaration of mutable variable: you can rebind this name to a new value
    valreference capability – globally immutable object
    wherewhen specifying named arguments
    whileloop statement
    withensure disposal of an object