▲ | moelf 4 days ago | |
this is counting it as if O only takes an argument, which is single dispatch, which OOP covers already (the `self` is the single argument). In practice, Multiple Dispatch shines when you have 1) more than one argument type (duh) 2) higher order `O` operation [1] [1]: think of a numerical routine that calls eigen or something, and you want eigen to exploit the matrix's type, such as symmetry or upper-triangular, and this is encoded as a matrix type) | ||
▲ | layer8 4 days ago | parent [-] | |
In the expression problem, the other argument is the operation to be invoked, which can vary at runtime as well. OOP doesn’t cover that. |