Hacker News new | ask | show | jobs
by beariish 307 days ago
There's nothing stopping a library author from explicitly annotating return types wherever a stable interface is important, the idea is more for smaller functions or callbacks to make use of this. Perhaps I'll make the examples clearer to reflect the intention.
1 comments

Perhaps it makes more sense to say that exported function interfaces be explicit. That forces you to document the api and more carefully consider changes.