-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Milestone
Description
Let's say that you have two math.add Ops:
- An
BiInplaceFirst<IO, I2>Op - A
BiFunction<IO, I2, O extends IO>Op.
If you have the following code
IO in1 = ...
I2 in2 = ...
O out = ops.run(in1, in2);
you have no idea whether you are running the BiInplaceFirst or the BiFunction.
The solution proposed by @ctrueden is as as follows:
- Write
Functions.apply,Computers.compute,Inplaces.mutate1/2/...that provide the same functionality ofops.run(i.e. being able to pass through arguments that are used to match anOpthen run thatOp) however will only match their type ofOp(i.e. a call toFunctions.applywould only callFunctionNs). - Remove
ops.run.
Questions:
- How should these new methods handle transformations? I.e. if I call
Functions.apply("math.add", ...), but Ops only has aComputernamedmath.add, what do we do? - There is the question of how we approach extensibility. Let's suppose that down the line a developer develops a new kind of
Opthat does not fit in any of these categories. Are they then restricted to callingops.findOp? Is this sufficient?
Metadata
Metadata
Assignees
Labels
No labels