You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 like let m: ... = map { [x + 1]: 42, [b]: y - 5, 24: 0 } as follows:
letm: <Address, Cell>=map {
address("..."): cell("..."),
address("..."): cell("..."),
// or even this"EQ...": cell("..."),
};
Additionally, there's a question of whether this should still be considered a map<K, V> or Cell in the Tact's type system. I'd say this should be a map<K, V>, and if user wants to, they can add explicit .asCell() cast as such:
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: