Things that interest me.
Generics are a thing I never really got, even when people tried to explain it to me. It took a small implementation to figure it out and all click together. I tried some earlier versions of Go Generics which did not seem to support using custom structs unless they shared a common property name which made the idea of a Generic function not so great. When I tried the next version after that I found that it worked great for native types, but again for custom structs it still felt a little strange to me. I tried an implementation using a interface to define a set of structs that met it and then some Generic functions on that interface, but that still felt strange to me. Finally in the GA version I found something that made sense to me, a truly Generic package that is completely type inaware and can take any type as an argument. Here is a super basic in memory cache with a simple get and set operations. You can instantiate a cache of any type you want and store entries in it and retrieve them. When you get the item back it will be in the proper type with no casting needed. I want to do some more exploring with this space, but so far this feels more interesting and less complicated than it felt earlier.
