Avoid Public Functions Calling Other Public Functions
0 comments · api, programming
- Comments20
0 comments · api, programming
Story details from Lobsters ↗ · linked article on matklad.github.io.
Avoid Public Functions Calling Other Public Functions was first seen by Trendoday on Oct 31, 2026. Since then it has appeared in 75 checks on 3 different days. It reached #3 on Lobsters · Hottest on Oct 31, 2026 UTC. It was last seen on Lobsters · Hottest on Nov 2, 13:51 UTC.
Best recorded rank on Lobsters · Hottest per UTC day.
Best rank per day (UTC).
A few top-level comments from Lobsters, shortened. Read the full thread on Lobsters.
I’m not sure I agree with this. I tend to build public APIs in layers. The low layer public API exposes all necessary functionality. The higher layers expose *convenient* functionality for common use cases. In C/C++, the higher-level interfaces are often header-only and designed to be inlined in the caller. They also…
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…
The problem I see there is not that foo calls bar specifically, but rather that bar's public interface has been damaged as an implementation detail of foo as opposed to a tiny refactor. So I feel like the better more general rule would be something like "do not damage the public interface unless absolutely…
Archived daily, weekly and monthly lists that include this entry.
Not at the moment. Its last recorded appearance was on Nov 2, 13:51 UTC.
#3 on Oct 31, 2026 UTC.
It was first seen on Oct 31, 2026 and has been on the list on 3 days (75 checks) since.