Skip to content

List literal sender syntax #818

Open
@emil14

Description

Before

s1 -> l[0]
s2 -> l[1]
s3 -> l[2]
l -> ...

After

list<int>{s1, s2, s3} -> ...

Implementation

  1. Change existing list literal const syntax from JS/Python-like to Go-like
  2. Add support for list-sender that mimics const syntax but refers to senders, rather than other constants, similar to Tagged Unions #751 and Struct builder syntax sugar #730

Downsides

Same as with #730 - it's inconsistent with const literals, because we don't refer to type on the right side of the const declaration, because we know the type from the left side. In the network, on the other hand, we have to refer to a type


Related to #730

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions