Nick Kleban
08/28/2023, 1:42 PMFlow
from all methods in Repository
interface (if they return something), instead of simple suspend functions with direct return type? Even if there is no plans to implement some kind of caching functionality in the near future.
Coming from RxJava perspective where this is usually the case (all methods are either Single, Observable etc.) I’m still unsure if this is beneficial in case if repository someday will need to expose stream of data instead of one shot return function. Any best practice advice?Stylianos Gakis
08/28/2023, 1:43 PMsuspend
and return the thing directly.Hrodrick
08/28/2023, 1:47 PMNick Kleban
08/28/2023, 2:07 PMstreetsofboston
08/28/2023, 9:01 PM... someday will need ...
Don't over engineer 😀 If you ain't gonna need it, don't design/code for it. When (IF!) the time comes when a flow is needed, then that bridge will be crossed then.