Skip to content

[suggestion] anonymous array declaration, relax object syntax (JS/Json syntax) #94

Open
@lofcz

Description

@lofcz

Currently EE can evaluate anonymous object declarations:

x = new {a = 10, b = 20, c = 30}

property = value is enforced in method InitSimpleObjet (we should rename that to InitSimpleObject). First part of this suggestion is to relax this syntax and allow customization (preferably in the way customization of new works now) such as:

x = new {a: 10, b: 20, c: 30}

second part of this suggestion proposes support of JS-like anonymous array declaration (respecting c# new initialization pattern), which would internally map to List<object>:

x = new [10, 20, 30] // x[2] = 30

@codingseb do you think this would be possible to implement and of use?

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions