Re:Ask HN: Why don't languages such as Java support json-lik...
by bjourne on Saturday November 11, 2017 @03:32PM
(#15678028)
Ah, you're right in case the syntax is for instantiating objects of existing classes/structs. My take was that the OP wanted the object literals to be able to create new types. In Javascript, var a = { x: 123, y: 456 } is meaningful without a prior class declaration.
[ Parent
| on HN ]
There are no comments on this comment yet.