Re:Value-Oriented Programming
by marcus_holmes on Saturday September 01, 2018 @01:40PM
(#17892972)
thanks :) I get this now. This would be useful if Go supported it.
I've used enums before (but just as constant values), and I'd love to have them in Go. Iota is nice, but as you say there's no constraint on the type. It seems like a good fit...
I've used enums before (but just as constant values), and I'd love to have them in Go. Iota is nice, but as you say there's no constraint on the type. It seems like a good fit...