Hacker News new | ask | show | jobs
by dnautics 3 days ago
that's not quite right.

1) It's var foo = Foo{...}; (no intervening dot)

2) I think parent commenter is referring to function call use case call_my_func(.{...})

1 comments

1) Ah yes, just typing from memory. Point still stands.

2) Adressed in the last paragraph.

Point being, these two things aren't different (variable assignment and function calls); IIUC they go through the same analysis pathway, result location semantics.

https://ziglang.org/documentation/master/#Result-Location-Se...

It's a little bit weird, since the types flow in the reverse direction than you would expect.