buzz icon indicating copy to clipboard operation
buzz copied to clipboard

Anonymous objects

Open giann opened this issue 3 years ago • 0 comments

Something like php stdclass and zig anonymous struct literals. Implies that we can subscript objects and possibly cast map into anonymous objects.

obj myObject = {
    hello = "world"
};

obj["hello"] == "world;

<std, str>{"hello": "world"}.toObj();

Type checking is done by defining the ObjTypeDef while parsing the object initialization. Should can still type check access to it after.

giann avatar Apr 14 '22 07:04 giann