3 ms·
A response to the common proposal of “we should call functors Mappables instead”: Names Do Not Transmit Meaning, https://www.parsonsmatt.org/2019/08/30/why_func
by thewakalix 5y ago
A response to the common proposal of “we should call functors Mappables instead”: Names Do Not Transmit Meaning, https://www.parsonsmatt.org/2019/08/30/why_functor_doesnt_matter.html https://www.parsonsmatt.org/2019/08/30/why_functor_doesnt_ma...
- epicureanideal 5y agoThis is a similar argument to not naming code directories based on anything reasonable, and naming them after types of fruit instead, because only by reading the code in each directory can you really understand it, and it always changes anyway. I think it’s better to at least try to make a name that transmits partial meaning or a general gist of the idea.
- wyager 5y ago> I think it’s better to at least try to make a name that transmits partial meaning or a general gist of the idea. If we didn’t use formal terms for math concepts, mathematicians would waste all their time arguing about the colloquial definitions of the colloquial words they tried to map onto abstract concepts. It’s better to have a clean break and force people to learn the specific formal meaning rather than try to limp along on a busted half-intuition.
- acomar 5y agothe terms actually do come from an intuitive place if you look at the underlying math. it's called a functor because it does something function-like - mapping arrows in the domain category to arrows in the codomain. in programming, we think of this as a higher-order function that lifts a function on a category (of types) to a function on a different category (of types). it's only when you try to elide that explanation that the name appears to come from nowhere. similarly, monads bear a strong resemblance to monoids - in fact, it's the same relationship as functions and functors and it's quite precise. these intuitions only become available to you with the math, though, and programmers have a strange aversion to mathematics for people who do it day in and day out.