zlacker

[return to "The bane of my existence: Supporting both async and sync code in Rust"]
1. eviks+vK[view] [source] 2024-01-20 04:36:57
>>lukast+(OP)
> Fixing maybe_async and adding _async and _sync suffixes to each endpoint in our library.

Can you not add a suffix only to one variant, e.g., "_sync", as far as I understood you just need different names?

◧◩
2. mst+l71[view] [source] 2024-01-20 10:16:07
>>eviks+vK
I use quite a few promise/future based APIs that have a sync version and an async version and the async methods are called get_p or get_f or so, which feels like very little noise when I'm already typing 'await' in front of/after it.
◧◩◪
3. eviks+K91[view] [source] 2024-01-20 10:46:09
>>mst+l71
That's why I thought async should be shorter, and also since it seemed for this lib async is the primary interface
[go to top]