Hacker News new | ask | show | jobs
by sdfsfsf3kjdf 1958 days ago
How exactly are you going to implement a type safe option type without generics? You either have to use interface{}, which is obviously not type safe, or write/generate an option type for every type contained within it. Sum types are a lot less useful if you don't have generics.
1 comments

It could have been built in to the language. Tons of builtin features (slices, maps, channels) are already "generic".
This