new syntax for empty dynamic object
See original GitHub issueAs initially proposed in #6571, change the dynamic
enumeration expression stuff so that:
dynamic obj = dynamic; //instantiate an empty object
dynamic obj = dynamic []; //instantiate an empty array
Issue Analytics
- State:
- Created 7 years ago
- Comments:27 (25 by maintainers)
Top Results From Across the Web
Create an empty object in JavaScript with {} or new Object()?
new Object() and {} are not quite empty objects, they are objects that have the Object.prototype. You can use Object.create(null) for a truly ......
Read more >Creating and Using Dynamic Objects (C# and Visual Basic)
Learn how to create and use dynamic objects in this walkthrough. ... In the Create a new project dialog, select C# or Visual...
Read more >Creating and Modifying Dynamic Entities | Using JSON in Caché
For example, the following code creates an empty dynamic object and uses standard object dot syntax to define the contents: set dynArray =...
Read more >Object initializer - JavaScript - MDN Web Docs - Mozilla
An object initializer is a comma-delimited list of zero or more pairs of property names and associated values of an object, enclosed in...
Read more >How to Set Dynamic Property Keys with ES6 - Samantha Ming
Previously, we always had to use the bracket notation to use a dynamic key. With ES6, we can finally create dynamic variable key...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@lucaswerkmeister I find that it offends my aesthetic sense that spreading an empty thing has any effect at all upon the “invocation”.
Well, no, it would do the same thing that
dynamic { ... }
does right now, i.e.{ ... }
.I would transform it to
[1, 2, 3]
.I don’t think so, no.
That’s true.
Anyway, it’s just something to think about. I don’t see this as a high priority thing to do, not unless we come up with some other useful interpretation of
dynamic Foo { ... }
for something other new thing in JS.