var p: Point = {x:1, y:2}
var x = '1'
var y = '2'
var a = {x:1, y:2}
This is also valid syntax. Same syntax in different contexts meaning different things. Thats not gonna work.. Well it could, but i think it would do more harm than good. Even though i would like a shortcut but thats not the point.
var p = Point(x: 1, y: 2)
Already works.
and tuples are even closer for simple types
type
Point = tuple[x,y:int]
var
p1: Point = (x:1, y:2)
p2: Point = (1, 2)
mapdog: It's just that some people familiar with Javascript, Json and C++ would be used to seeing objects with braces.
That may well be, but Nim's syntax has almost no overlap with C++/Javascript to begin with, so I'm not sure why this specific syntax (of all things) should look like either of them.