@wolf480pl@mstdn.io @algernon@trunk.mad-scientist.club Returning a MetricsSet from functions would require knowing the implementation of MetricsSet inside each of those functions.I'm not sure I understand the problem here? I guess you lose the loose typing through protocols, but I don't find that a major problem here - your MetricsSet could join based on a protocol, building a tree of whatever implementations fit the specific function's output best. Though I don't think there's real value in that.
I don't know why do you think merging would need to be cumbersome - it's a two argument function call, with one of those being implicit, and if you want, there are fitting operations to overload.
As for caller determining the implementation - make your MetricsSet protocol loose enough and you can export in whatever format you want - you'd really only need to change the top layer for that.
Embed Notice
HTML Code
Corresponding Notice
- Embed this notice
Ignas Kiela (ignaloidas@not.acu.lt)'s status on Tuesday, 25-Jun-2024 17:43:27 JSTIgnas Kiela