Values and Types

Novum is dynamically evaluated, but the runtime has explicit type categories for diagnostics and standard-library APIs.

Core values

The runtime currently includes categories such as:

TypeTypical literal / origin
Int42
Float3.14
Booltrue, false
Str"hello"
List[1, 2, 3]
Dictdictionary literals
Tupletuple expressions / pattern values
Range1..5, 1..=5
Vectorlist.vector() / vector operations
Matrixmatrix literals and matrix operations
Iteratoriterator pipelines
Option valuesOption.Some(...), Option.None
Result valuesResult.Ok(...), Result.Err(...)
Objectstruct/class instances
Classstruct/class runtime definitions
Moduleimported module namespaces
Function / Builtincallable values
EnumValue / EnumConstructorenum values and constructors
Pathfilesystem paths
Unitno meaningful value
Nullnull-like value used by some APIs

The exact set is implementation-defined and may grow as the runtime evolves.

typeof

The language provides a typeof builtin for inspecting runtime type information.

typeof(42)
typeof("hello")

String conversion

str(value) converts a value to a string representation.

str(42)
str(3.14)
str(path("data/file.txt"))

Numeric conversion

int(text) parses a string as an integer and float(text) parses a string as a floating-point value.

int("42")
float("3.14")

They are parsing operations rather than arbitrary coercions.