logoalt Hacker News

9rxyesterday at 3:26 PM1 replyview on HN

> Sum types in general are missing from Go

Not quite. It doesn't have tagged unions, which is what I expect you are thinking of, but it does have sum types.


Replies

josephgyesterday at 7:18 PM

Only by abusing interface {}. The result is horrible.

Go doesn’t have sum types as a first class primitive.

show 1 reply