Comment by SAI_Peregrinus
9 months ago
That embeds the "why" into your API. If it ever changes, the function no longer serves as an abstraction over that underlying reason & changing the function name breaks your API.
That's not to say embed nothing into the names. I'm quite fond of the "Long Names are Long" blog post[1]: names need to clearly refer to what the named thing does, and precise enough to exclude stuff it doesn't do. Names can certainly get too short, e.g. the C "sprint fast" function `sprintf` is probably too short to be easily understood.
[1] https://journal.stuffwithstuff.com/2016/06/16/long-names-are...
No comments yet
Contribute on Hacker News ↗