UpNext

10.4.1  Overview

Mythryl supports both alphabetic identifiers like in and non-alphabetic identifiers like ++. In general Mythryl does not distinguish between them semantically; either may be used to name a function, and either may be used as an infix operator. Whether a given identifier is infix or not is controlled not by their syntax but rather by using statements like:

    infix  my ++ ;      # Make '++' infix,  left-associative.
    infixr my ++ ;      # Make '++' infix, right-associative.
    nonfix my ++ ;      # Make '++' not infix.

    infix  my in ;      # Make 'in' infix,  left-associative.
    infixr my in ;      # Make 'in' infix, right-associative.
    nonfix my ++ ;      # Make 'in'not infix.

Like C and most contemporary languages, Mythryl is syntactically case sensitive: foo, Foo and FOO are three separate identifiers.

Unlike C and most contemporary languages, Mythryl is also semantically case sensitive:

    foo                  # Variable, function or package name.
    Foo                  # Type or API name.
    FOO                  # enum constant / sumtype constructor.

Comments and suggestions to: bugs@mythryl.org

UpNext