Hacker News
points by throwaway894345 2 days ago | 0 comments
Use the same `Option[T]` type that you will need to define for strings and numbers and structs.
[–] c-hendricks 2 days ago
What was the solution before go had generics? I thought it was nil pointers.
[–] throwaway894345 2 days ago
I don’t think there was a single canonical solution, but pointers to everything was a pretty common one. Everything in the AWS SDK was a `string` or a `float64` or similar—it was exceedingly annoying, not least of all because it basically forced tons of unnecessary allocations.