- Learning Functional Programming in Go
- Lex Sheehan
- 68字
- 2021-07-02 23:13:36
Functional packages
There are many other Go packages that provide the high-order functions (HOF) that we've come to expect when writing declarative code for manipulating collections. They typically use empty interfaces and reflection, which have negative performance impacts. A well known HOF implementation is Rob Pike's Reduce package (see https://github.com/robpike/filter) where he states his preference for using for loops and clearly states, don't use this.