logoalt Hacker News

beariishlast Sunday at 6:59 PM1 replyview on HN

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.


Replies

flakeslast Monday at 2:58 AM

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.