logoalt Hacker News

piinbinaryyesterday at 7:19 PM3 repliesview on HN

This makes me want to find a side project for an excuse to give Go another try (I last used it professionally pre-generics).

I do still wish it had discriminated unions (algebraic data types) and some better error handling ergonomics.


Replies

ainar-gyesterday at 7:28 PM

Re unions:

https://github.com/golang/go/issues/76920

You might want to follow this proposal, if you aren't already. It's the most recent one, and it's supported by quite a few “core members” of the Go Team. I don't think it'll land in 1.28, but I like the fact that it's still a feature that's being actively discussed.

Splizardyesterday at 8:01 PM

Tagged unions can be implemented in user code, you dont actually need language support to use them.

https://github.com/splizard/tagged

show 3 replies
codegeekyesterday at 7:55 PM

Do it. It is just a beautiful language to write and much simpler to pickup than many others. I am a fan boy of course but I love Go.

show 1 reply