5 ms·
At first, even if I knew they were useful, I didn't have much use for generics. But it came increasingly handy and there is even code that I could not have writ
by aatd86 2y ago
At first, even if I knew they were useful, I didn't have much use for generics. But it came increasingly handy and there is even code that I could not have written without these.
Will probably be the same for iterators.
- jkrejcha 2y ago> Will probably be the same for iterators. I think especially because people were already doing iterators, just in a not-really-specified way, as the discussion[1] for this change mentions. (I mean people were kinda doing generics too with code generation but that was probably less doable for library code...) [1]: https://github.com/golang/go/discussions/56413 https://github.com/golang/go/discussions/56413
- jimbokun 2y agoYeah, a Cassandra library has an “iterator” that reads a row’s data into a struct pointer, and returns false if there’s no more data.