Hacker News new | ask | show | jobs
by Timwi 32 days ago
Technically anonymous I suppose because the struct is not named, but the article is mostly about type inference while your example has every type made explicit.
1 comments

The article mentions Typescript and Purescript under the heading "Static typing" - their definitions correspond exactly to the Go definition, with explicit types for the members.

I was just saying that for completeness, Go should probably be mentioned in that list since it's become a pretty significant language.

(For the record, I'm an absolute Go hater, but I'm also a PL enthusiast, so...)

Author here: those type annotations are optional in the case of TypeScript and PureScript; I only included the type annotations for clarity

That said, I didn't know about Go's support for inline struct definitions like that!