Our great sponsors
-
stream
A Go library of functional-style generic filter-map-reduce operations (by AlexanderYastrebov)
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
iter
Experimental lazy iterator library to test the capabilities of go generics in 1.18 (by urandom)
After taking a stab at some more functional approach with generics in Go — https://github.com/gtramontina/go-extlib — I do agree that some of it does feel shoehorned. Although for some other constructs, it feels quite nice. As I mentioned on the readme of the linked repository, this post https://hypirion.com/musings/type-safe-http-servers-in-go-vi... presents pros and cons nicely.
I agree, the current implementation is really not sufficient, at least for this. I played around with lazy iteration a while back and found the current restrictions would make working with it an annoyance.
I've placed some thoughts in the Readme [1] so I don't forget. Hopefully at least some of the restrictions will be dropped.
1: https://github.com/urandom/iter