3 ms·
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.
by Timwi 3mo 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.
- antonvs 3mo agoThe 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...)
- Gabriel439 3mo agoAuthor 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!