3 ms·
Why not have these on data? If they only get returned from one function call, you have to manually deal with them in each function. If attached to data, they ca
by asolove 13y ago
Why not have these on data? If they only get returned from one function call, you have to manually deal with them in each function. If attached to data, they can get aggregated over large chains of fn calls.
- CraigJPerry 13y agoWhy pollute your data objects when you could just return a separate object at the same time? Improves cohesion. Seperates responsibilities. Removes duplication and redundancy. When you pass the metadata off for aggregation or other processing with this multi return model, you dont pull along a chunk of irrelevant business data at the time.