Skip to main content
Clarification
Source Link
redman
  • 121
  • 4

Should I provide these methods or should I let people implement their own?

I'm trying to find the post (itI think it was either here orStephen Cleary on SO), but one of the answers had made the point that he preferred to make his operations synchronous and let the client decide if they want to call them asynchronously or not.

It stuck with me because of who posted the answer (...still trying to find it...) was Stephen Cleary and I liked the idea that your code can be used in the same old way without having to think about it, or it can be wrapped in an async wrapper, which requires a bit more thought but it's work you're choosing to take on.

This, versus the opposite situation where you have to think about and put more effort into using a library in the standard synchronous way we're generally used to.

Should I provide these methods or should I let people implement their own?

I'm trying to find the post (it was either here or SO), but one of the answers had made the point that he preferred to make his operations synchronous and let the client decide if they want to call them asynchronously or not.

It stuck with me because of who posted the answer (...still trying to find it...) and I liked the idea that your code can be used in the same old way without having to think about it, or it can be wrapped in an async wrapper, which requires a bit more thought but it's work you're choosing to take on.

This, versus the opposite situation where you have to think about and put more effort into using a library in the standard synchronous way we're generally used to.

Should I provide these methods or should I let people implement their own?

I'm trying to find the post (I think it was Stephen Cleary on SO), but one of the answers had made the point that he preferred to make his operations synchronous and let the client decide if they want to call them asynchronously or not.

It stuck with me because it was Stephen Cleary and I liked the idea that your code can be used in the same old way without having to think about it, or it can be wrapped in an async wrapper, which requires a bit more thought but it's work you're choosing to take on.

This, versus the opposite situation where you have to think about and put more effort into using a library in the standard synchronous way we're generally used to.

Source Link
redman
  • 121
  • 4

Should I provide these methods or should I let people implement their own?

I'm trying to find the post (it was either here or SO), but one of the answers had made the point that he preferred to make his operations synchronous and let the client decide if they want to call them asynchronously or not.

It stuck with me because of who posted the answer (...still trying to find it...) and I liked the idea that your code can be used in the same old way without having to think about it, or it can be wrapped in an async wrapper, which requires a bit more thought but it's work you're choosing to take on.

This, versus the opposite situation where you have to think about and put more effort into using a library in the standard synchronous way we're generally used to.