3 ms·
The frustrating thing about Go for me is that it lacks generics but is strictly typed, which encourages the passing of empty interfaces which can cause problems
by patientplatypus 7y ago
The frustrating thing about Go for me is that it lacks generics but is strictly typed, which encourages the passing of empty interfaces which can cause problems at runtime. You have to be very careful about storing all your data properly in structs or you face a big foot gun.
Which, like, fair enough. It's not perfect. But it's still really really good. I mean, people still use Java...
- cpuguy83 7y agoThe alternative approach here would be to gernerate code for things that need genetics rather than using empty interface. Of course as with all things there are trade-offs... as there will be if/when generics are introduced.