Data Types / Collections
Basic Types
Fluency Programming Language supports the following data types.
Primitives
The following tables shows the list of supported primitive types, and corresponding example:
| Name | Type | Description | Example |
|---|---|---|---|
| String | string | Group of text characters | ABCabc |
| Integer | int64 | Number | 1 |
| Float | float64 | Number w/ decimals | 2.0 |
| Boolean | bool | Logical true/false | true |
| Null | null | ||
| Undefined | undefined |
Collections of Primitives
The following tables shows the list of supported collection types, and corresponding example:
| Name | Type | Description | Example |
|---|---|---|---|
| List | []a | List of primitives | []string |
| Map | map[a]b | Map of primitives | map[string]int64 |
| List (interface) | []interface{} | JSON Array | []interface{} |
| Map (interface) | map[string]interface{} | JSON Object | map[string]interface{} |
Note: Lists (arrays) are zero-indexed
Objects
The following tables shows the list of supported Object types, and corresponding example:
| Name | Description | Example |
|---|---|---|
| Tuple | List of Data Types or Object Types | |
| Map | Map of Data Types or Object Types | |
| Time | A time object w/ current time | |
| Error | Error Object | SyntaxError |
| Lambda | Anonymous expression | (x, y) => {} |
| FplTable | Tables | |
| FplMetric | Metrics | |
| FplAlert | Alerts |