-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Add as expressions for explicit type coercion. This requires adding type names as keywords, probably contextual keywords since they could only be used after the as keyword.
let a = false as string; // "false"
let b = 2 as bool; // true
let c = () as num; // 0Type names
| Type | Name |
|---|---|
| Number | num |
| Boolean | bool |
| Function | func (same as keyword) |
| String | string |
| List | [] (same as list expression but without elements) |
| Object | {} (same as object expression but without properties) |
| Nil | () |
Unanswered questions
- Operator precedence
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels