News for hackers. Stuff that matters.
Re:King – man + woman is queen; but why? by taejo on Monday January 09, 2017 @07:11AM (#13355751)
> London - Paris makes sense. But 2London does not.

I guess you know this, but for others: London-Paris makes sense, but has a different type to London and Paris (it's a vector, not a position) and while 2London doesn't make sense, 2(London-Paris) does make sense (it's a vector with the same direction but twice the length).

Such a system, with two distinct types -- positions and vectors, with vectors being the differences between positions -- is called an affine space. You can identify positions with vectors by picking a distinguished origin, but then you don't get the type-safety that forbids ridiculous expressions like 2London.

There are no comments on this comment yet.