Re:Generics enabled by default in Go tip
by yawaramin on Saturday August 21, 2021 @02:55AM
(#28254858)
Yeah, but programming is the business of building little tools to help you build what you actually want to build, over and over again. E.g., you might have some API calls in your code and need to implement an error handler on some of them. You could repeat the error handler code on all of them, or you could extract it out to a generic function and just use it as a wrapper for the others:
Python made this kind of technique famous, but languages with generics can do it pretty well too.
[ Parent
| on HN ]
There are no comments on this comment yet.