3 ms·
There's some pain in writing generic data structure algorithms for sure. It would have been an interesting experiment though if the Go authors would have tried
by wvh 5y ago
There's some pain in writing generic data structure algorithms for sure. It would have been an interesting experiment though if the Go authors would have tried to improve the tooling around code generation and making it easier to use, as an alternative avenue to generics as code generation might satisfy some of the cases likely to trigger those complains.
Anyway, interesting to see how far they will take the generics in the path to Go 2.
- pjmlp 5y agoIt isn't as if previous languages did not used code generators before generics were a thing on them.
- amw-zero 5y agoYea but, it has never been a particularly popular approach.
- pjmlp 5y agoIt surely was in C, C++ and Java. Borland BIDS 1.0 used such approach with pre-processor tricks, similar to many C projects do as well. Java, well EMF was a common tool to generate such boilerplate, Velocity was another one.