Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If I had sum types in Go, I'd use them for state machines and enumerations mostly. I can't see a huge downside; I'm sure some software has little use for it, but it's useful enough for data modelling that protobuf has the sort-of similar oneof primitive. Hmm. On that note, maybe it would be better than nothing to do some kind of code generation here...


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: