Skip to main content

Keywords

Keywords are case-sensitive. If an identifier spellings match a keyword, it is read as that keyword, not as a user name.

Keyword list

SpellingRole
isUsed in type and pattern positions where grammatically allowed
voidVoid type / literal contexts
switchNot supported in current Spine (reserved; may error if used)
matchMatch expressions
ifConditionals
elseBranches
defaultNot supported in current Spine (reserved)
throwNot supported in current Spine (reserved)
asCast: expr as Type
StructStruct declarations; also allowed as some enum variant names
AnnotationAnnotation declarations and variant names
EnumEnum declarations and variant names
namespaceNamespace blocks
importImports
returnReturn from function or closure
failExplicit failure with strategy
breakExit loop (optional value)
continueContinue loop
streamUsed in stream-related grammar
constConstant inside function/closure body
letBinding inside function/closure body
forLoops
while / doLoops
infor x in iterable
functionTop-level function

true and false are boolean literals and cannot be used as ordinary identifiers.

Contextual names

These behave like ordinary identifiers except in declaration headings:

  • Singleton in Singleton Name : Type = value
  • Ingest, Outlet, KeyValueApi, etc. as the leading type in Type Name { ... } wired declarations

Elsewhere, Ingest and similar spellings are normal names.

@ and versions

@ after a name attaches a version (Thing@1). A lone @ starts an annotation on a field.