Map expressions #1241
Labels
feature: maps
The map datatype and operations on it
kind: language feature
Intent to add a language feature
scope: parser
Implementation of parser (src/grammar)
Milestone
where
k1
, ...,kn
-- key expressions,v1
, ...,vn
-- value expressions. If a simple literals and Identifiers are used as key expressions, we the syntax allows using them directly and if those are complex expressions, then the user needs to wrap those in square brackets (see an example below).If all the key and value expressions can be computed at compile-time, it should translate into a constant cell primitive, a-la
cell(...)
, otherwise we desugar something likelet m: ... = map { [x + 1]: 42, [b]: y - 5, 24: 0 }
as follows:The text was updated successfully, but these errors were encountered: