finds.dev

robpike/filter

Simple apply/filter/reduce package.

View on GitHub

★ 870GoNOASSERTIONupdated Jan 2023

// the take

A tiny Go package implementing map/filter/reduce using reflection, written by Rob Pike as an experiment. The author's README explicitly tells you not to use it and admits he never has.

Written by Rob Pike, so the API design thinking is worth reading as a study in Go idioms. The reflection-based implementation is a clean example of how far you can push `interface{}` before things get ugly. Tests are present and cover the basic cases.

Reflection kills type safety — you pass `interface{}` and get panics at runtime if types don't match, not compile errors. Predates generics entirely; a proper generic version would make this obsolete and the author knows it. The repo's own README is a deprecation notice. 870 stars for a package nobody should ship is a monument to curiosity clicks, not adoption.

We read the README, the directory tree and a key source file in July 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
870
Forks
59
Language
Go
License
NOASSERTION
Last commit
13 Jan 2023

// nearby

If filter isn't quite it.

All repos →