Hacker News new | past | comments | ask | show | jobs | submit login

mmm, this seems to be a confusion of names. Using const and iota in Go helps you to create enumerations (http://en.wikipedia.org/wiki/Enumeration) whereas enum in Rust is actually creating a tagged union (http://en.wikipedia.org/wiki/Tagged_union). Most of the time in Go, you would define a new interface for the situation the author is describing.



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

Search: