Boomla language docs
As expressions
+
Overview
Types
Nil type
Boolean type
Numeric types
String type
Array type
Map type
Struct type
Function type
File type
Bucket type
Reference types
Box type
Expressions
Operators
Get expressions
Index expressions
Slice expressions
Grouping
Literals
Instantiations
Identifiers
Call expressions
Xml expressions
Function literals
As expressions
Statements
Import statement
Type declarations
Var declarations
Function declarations
Method declarations
Assign statement
If statement
For statement
Assert statement
Return statement
Fail statement
Panic statement
Yield statement
Break statement
Continue statement
Defer statement
IncDec statement
Expression statement
Block statement
As expressions
as
expressions assert the type of a boxed value.
If successful, the result is the value with the narrowed type.
On failure, the expression produces a runtime panic.
fn main() () (err error) { var name string|nil = "Max" var greeting = "hello " + (name as string) println(greeting) }
Run
fn main() () (err error) { var name string|nil var greeting = "hello " + (name as string) // panics println(greeting) }
Run