Avoid Public Functions Calling Other Public Functions
10 comments · api, programming
- Comments8
10 comments · api, programming
Story details from Lobsters ↗ · linked article on matklad.github.io.
Avoid Public Functions Calling Other Public Functions was first seen on Lobsters · Hottest on Oct 31, 2026. Since then it has appeared in 32 checks on 2 different days. Its best position was #3 of 25, reached on Oct 31, 20:51 UTC. It is #5 right now, slipping from #4 to #5 over the last 6 checks.
Position on Lobsters · Hottest at every check (lower is better).
Best rank per day (UTC).
▲ as reported by Lobsters.
A few top-level comments from Lobsters, shortened. Read the full thread on Lobsters.
A concrete thing related to this I just ran into yesterday, is that when reporting certain kinds of errors, I collect a stack trace for later rendering to indicate which public function call was responsible for the creation of a particular artifact. You can make the first stack frame be the callsite of the public…
I've been in the shoes of a developer adding optional function after optional function to make things "easier" for users. Some of the worst APIs grow this way. "Everything is in one function call" except that you've effectively reinvented having multiple functions by way of parameters. Also, "sanctified ink" is…
I see how having both `foo` and `bar` call a private helper improves the public API. But I immediately wondered why not have *different* private helpers, `frobnicate` and `transmogrify`. (To put this another way: `helper(.frobnicate)` and `helper(.transmogrify)` struck me as swapping the original flag boolean for a…
Yes. As of Nov 1, 11:51 UTC it is #5, slipping from #4 to #5 over the last 6 checks.
#3 on Lobsters · Hottest, on Oct 31, 20:51 UTC. Trendoday checks this list every 30 minutes.
It was first seen on Oct 31, 2026 and has been on the list on 2 days (32 checks) since.