From 172b2fc8dbcd7c645191e60fffcf127f5095e2b4 Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Wed, 3 Apr 2024 11:33:00 -0400 Subject: [PATCH] Added constants to the spec --- design/spec.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/design/spec.md b/design/spec.md index a357fe4..f45ac57 100644 --- a/design/spec.md +++ b/design/spec.md @@ -12,7 +12,8 @@ are: - Private access: Disallows other modules from accessing a top-level entity. This mode is the default when one isn't supplied. ### Type definition -Type definitions bind a type to a global type identifier. +Type definitions bind a type to a global type identifier. They may list named +constant values of their type accessible via constant access. ### Function Functions bind a global identifier and argument list to an expression which is evaluated each time the function is called. If no expression is specified, the @@ -303,6 +304,11 @@ the function or method will cease. Assignment allows assigning the result of one expression to one or more location expressions. The assignment expression itself has no value and may not be assigned to anything. +### Constant access +Constant access allows accessing an enumerated constant defined as part of a +type. It can be assigned to a type matching the constant declaration's type. +Since it contains inherent type information, it may be directly assigned to an +interface. # Syntax entities