4 ms·
In math, you have: matrix multiplication, vector cross product, ... So where does this idea originate?
by toolslive 7y ago
In math, you have: matrix multiplication, vector cross product, ...
So where does this idea originate?
- acjohnson55 7y agoIn linear algebra, you typically use juxtaposition to represent multiplication, rather than explicitly with a symbol. For some reason, this actually seems to capture noncommutativity better than a symmetric symbol. Another example would be string concatenation, which people often debate the merits of using a + to represent.
- js8 7y agoI guess it originated from my synthesis of the article. The article gives an example: copy() bad, copyFrom() good. The single word "copy" doesn't imply which side is which, it is kinda "symmetric". However "copyFrom" does show the side, it is kinda "asymmetric". I just considered symbols instead of words as method names. (After all, if we are to make things shorter.. TLDR is a double joke here.) And yes, you're correct, in mathematics, this is often not the rule. It's not even a rule in Haskell. But perhaps it could be a rule, at least for new operators?