Where is an API of, let’s say, one method: “DoSomething()”. There should be two versions of the method: asynchronous and synchronous. We should encourage API users to use async one so sync one probably should get more complicated and explicit name. So the problem is: how should we name this pair. To the date we’ve came up with:
None of above schemes seems like optimal for us. Any suggestion folks?
Update. BTW do not hesitate to post one of the above as an answer if it fit you.
If you want to encourage your user to use async ones over sync, then I'd go for this one : DoSomethingSync() / DoSomething()
However, tell your users loud and clear that all methods are async if not told otherwise.
Example : node.js uses this notation : fschmodSync
and fschmod
But the most important is to stick with the one you chose.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With