Furthermore, a bunch of things being named terribly doesn't support the thesis that names don't transmit meaning. It supports the thesis that a bunch of people failed to communicate and they should have put much more effort into naming things accurately.
> Names don’t make them any easier or harder to understand
If we renamed every variable in Firefox, for example, with numbers, people would find it more difficult to understand, so this is an absurd thing to say. The reason we use names is because they do convey meaning. That meaning (index into our conceptual map) is what differentiates them from the numerical value of the string of letters which make up their textual representations and makes them so much easier to remember and understand contextually!
Whenever the topic of names comes up, I reread one of my favorite blog posts I've ever come across: "What's in a Name" by Olin Shivers . Here's the thesis statement:
> [My thesis advisor, Allen] Newell [...] explained his understanding of names: “They provide distal access.” That is, a name is a local piece of data that stands for some other piece of data, which is presumably large and remote. You can now use that small, convenient, local datum instead of the large, remote thing for which it stands.
(If, like me prior to reading this, you're unfamiliar with the word "distal", it means "Remote from the point of attachment or origin." )
Thank you for this! It was a really engrossing read.
> When he said “distal access,” he assumed that you, too, have structures on one side of your head representing what you know about, say, Neil Armstrong, and a smaller structure on the other side of your brain encoding the name “Neil Armstrong,” and cognitive mechanisms allowing you to fetch the former given the latter.
I thought this was an interesting example that glossed over some (to me) really interesting things in cross-contextual (usually cultural?) miscommunication. This assumption that the other person you're talking to has the same concept in mind for a word is at the root of all communication we do.
A simple example would just be UK to US English -- something as simple as "fanny," which has differing meanings to both populations.
For a non-geographical contextual gap, we can look at slang like "salty." a "salty meal," "salty boy," and "salty dog" are all completely different things.
Some of the biggest difficulties I run into with communication aren't with people who speak no English at all (I live in Japan), but people who speak English in a dialect(?) that's close to what I expect, but slightly different and used differently (e.g. as high context instead of low context). Sometimes I can be speaking with someone from India who has perfectly grammatically correct, fluent English, and suddenly be thrown for a loop when I realize that a word had a completely different meaning for both of us without either of us realizing it.
It's just a really interesting concept I think about a lot since I do a lot of cross-cultural communication.
`Mappable` provides short-term comfort due to familiarity, but to do so it sacrifices precision that is essential in the long term.
1) For all sets s, s.map(identity) == s ==> true
2) For all sets s, functions f and g,
s.map(x => f(g(x)) == s.map(g).map(f) ==> true
On the other hand, Map's map method is much more horrible, and does violate the 2nd functor law where f == g == _.swap :
Map(1 -> 2, 2 -> 2).map(_.swap).map(_.swap) ==> Map(2 -> 2)
Map(1 -> 2, 2 -> 2).map(_.swap.swap) ==> Map(1 -> 2, 2 -> 2)
Further, it behaves differently depending on if it is known to be a Map at compile-time, or if it is only known to be an Iterable[(K, V)], due to overloading:
Map(1 -> 2, 2 -> 2).map(_.swap) ==> Map(2 -> 2)
(Map(1 -> 2, 2 -> 2): Iterable[(Int, Int)]).map(_.swap) ==> List(2 -> 1, 2 -> 2)
Definitions are precise, not names. Names aren't what makes math work, it's the precise definitions, inference rules and theorems, regardless of the language in which they are written. 'printf' does not work the same in all programming language yet everyone knows what that name means.
I can forgive Haskell for using the word "functor" because it came from academic roots, it isn't a language like Go designed specifically to make things easy for programmers to pick up.
Why isn't Set a Functor? Because it doesn't obey the functor laws (because a == b doesn't imply f a == f b). Why are those the functor laws? Because that's all that Functor means.
Why isn't Set a Mappable? Because it doesn't obey the Mappable laws. Why are those the Mappable laws? Because they're the Functor laws? Why should that be the case? Maybe we should pick (or have picked) different laws for Mappable? Maybe we'll find better laws for Mappable, but we've given up that rarefied connotative linguistic real estate. There's extra room for drama and bike-shedding that isn't present when we're using already established names that precisely describe the interface even if they happen to be unfamiliar.
Similarly, if Semigroup should be called Appendable, what would you call Monoid? And is there a consensus on Monad as well?
On the other hand, obviously Monad should be called Burrito.
Names can't transmit the complete meaning of a concept, but they can still transmit a partial or ballpark representation of that concept. In the world of linguistics it's easy to see how many names come from the composition of Greek or Latin roots, prefixes and suffixes, or Chinese composition of radicals. I don't find it particularly compelling to try to make the case that names cannot transmit ANY meaning at all -- therefore let's choose some other arbitrary criteria for judging names.
If you think about the concept of affordances/signifiers from HCI and interaction design, people do draw upon their past experience when encountering new, unknown concepts, and in the PL space a good name can streamline the process for learning a new concept. It's just that Functor has affordances from category theory and, well, most people haven't taken enough advanced math to access those affordances before encountering Functor.
I think Matt would have been better off calling this article "New Concepts Deserve New Names", rather than try to say that all names transmit no meaning whatsoever. I think I would agree that it's not a huge price to develop new affordances for Functor, Applicative, Monad, Semigroup, and Monoid, in comparison to the potential pitfalls of choosing a name that points to a potentially vague or incorrect meaning. And I personally like the names because although they were poor pointers to meaning, they were good pointers to their mathematical roots, and that makes me curious to learn more category theory.
Names can't transmit the complete meaning of a concept
Names are the first point that you often encounter a subject. Arguably, it's more important that a name be more familiar at the expense of precision. As the developer becomes more familiar with the concept, they'll understand, for instance, that "Select" in C# is for converting one object to another, and "Where" is for limiting the results. Sure, at first glance, one might think "Select" is for filtering, but the release of LINQ coincided with language features centered around reducing the need to write SQL, so the name "Select" and "Where" were used rather than "Map" and "Filter" because they correlated directly to keywords in SQL.
I'd argue both that "Familiarity is the reason names are chosen" and that in the context of software development, choosing familiar names that easily transfer to a concept that is "good enough" has greater value than picking an obscure, but precise word.
If names fit well with what a person already knows, they can aid memory and even impart understanding. If names are poorly chosen they can instead confuse.
When I read that, I had never seen the word "bikepacking" before, but I think I've got a decent idea what it means. Words matter. Technical terms exist in a context and are not just arbitrary identifiers. If we called monoids broccoli and other concepts had other random words, programming would be harder. Not everything can get a great name, but we should try.
1) Are there domains where naming things is easier? Perhaps even trivial? As a layman in both, biology and astronomy come to mind. Where you just find a Latin word vaguely describing what you see, and if nothing comes up you just pick a name of a famous person from your field that doesn't already have something named after them.
2) If non-English languages are also considered, are there any where naming things is easier? Have to keep in mind that a "good" name maintains a balance between descriptiveness and brevity.
3) Can this be considered as an advantage of point-free style?
4) Is naming things in programming hard as in "building a spaceship" or as in "making the NBA"? That is, can you name all the things if you put in enough effort, or are some things simply unnameable?
As a native English speaker with a relatively very weak understanding of Chinese, I find Chinese names to be generally understandable and English names to be completely opaque.
This is most pronounced when dealing with technical topics:
For example, because I know essentially no Latin or Greek, a name like "Bilirubin" means absolutely nothing to me. Whereas the Chinese word, 膽紅素 (膽 - gall bladder, 紅 - red, 素 - essence), is actually something I can break down and have any idea at all what it is.
Japanese is also generally better than English in this regard in my experience, but unfortunately it often borrows words from other languages. In this case, ビリルビン (birirubin), so it can be even more opaque than English.
In the case of "functor", I also find the Chinese (函子) more obvious than the Japanese (関手) or English.
If not too much to ask, can you please explain how those non-latin characters form the meaning for the word "functor"? In my native tongue (Turkish), we borrow the word "functor" without applying a translation to it, thus it becomes one of those things you simply memorize and move on.
Do these Chinese and Japanese words form a meaning similar to something like "function-izer" or "function+abler" or something else?
A sibling comment points out that 子 can mean child. This is the original, ancient meaning of the character. This usage is still productive in modern Chinese (usually to mean sons), but the previous examples are examples of how the meaning has undergone some transformations to form derived, related meanings. The original meaning can also be found in technical contexts. Examples of this are 子集 (child + set = subset) and again 分子 (fraction + child = numerator) with the counterpart 分母 (fraction + mother = denominator). This is not how I scan functor 函子 though.
In the Chinese programming community, you'll usually just see the English words "Functor" and "Monad" used. I wouldn't be surprised if some Chinese programmers familiar with "Functor" do not recognize "函子." I've only ever seen 函子 used in math articles and occasional FP tutorials (and even then, given how dominant English is, it is often glossed by "Functor").
関 - Checkpoint or barrier, for example at customs and borders; "bolt" for closing a door; to relate. (https://kanji.jitenon.jp/kanji/463.html)
手 - Hand, method, to do something "by oneself" as in by own's own hands. (https://kanji.jitenon.jp/kanji/033.html)
So roughly/possibly "a method of relating".
"Function" in Japanese is 関数. Same first character as functor, and the second one means "number". It's also written as 函数, which comes from the Chinese word for it.
In the Chinese word for functor, 函子, the second character means "child".
I see a lot of people struggle with naming because they’re trying to materialise the ‘right’ name, when all you really need is one that’s good enough, unlikely to be misinterpreted, easy to find/look up docs, etc.
In defense of Haskell however, author does have a point. Names for abstractions and anything you cannot touch and hold and easily categorise as a human in everyday life are really hard because current English is almost void of good words that capture or describe these concepts. Map and reduce, as two examples he rightly points out, are no more meaningful to most people than any other name we could give, and the only reason we think they are or might be is when we come from a context that has already learnt them. The same could be said for add, minus, subtraction, division, if they weren't essentially universally taught in universal education.
Who knows, maybe in the future, when abstract programming becomes widely taught, maybe words and concepts around abstract operations will enter the mainstream language.
Although, as a controversial counter-proposal to that (which I am merely putting forth, not necessarily advocating, i admit ignorance in this regard) if it turns out that various levels of abstract thought are not universally learnable by humanity, which is to say, are there thoughts and concepts some/most people can't think, then such words and vocabulary will always be an 'elitist' language...
OOP terminology feels more "Software Engineer"-y to me and FP terminology feels more "Math"-y.
So OOP feels more at home and FP feels more foreign.
On the other hand, in OCaml feels at home and Haskell/PureScript feels very theory-heavy.
A monad is a different concept in this context.
Liken them to other analogies using other names can help build up the required knowledge
Mappable is definitely better in one specific context but contrary to the author I think that Iterable may be even better as it is a more generic name (Iterable can be also Foldable).
Or does Mappable mean that you will mutate the state?
But why not refer to multiple names? Functor also known as Mappable or Iterable?
When I tell my kids to "Open the door" when they knock, I'm referring to the door they knocked on, not the front door, the garage door, or the sliding back patio door. They're all wildly different concepts for "door" but I can refer to each of them as a "door" with either implied (as-in the nearest door to where I'm standing) or by providing additional explicit context (the "back" door is enough for everyone who has visited my home, thus far, to understand that I'm referring to the sliding-glass patio door).
 Note that I'm not referring to business names or names for people. They serve different purposes.
> I don't even have a terribly good way to do that with the word "function"
This is something I have internalized: function is a map is a map is a map from one set to another. This is the reason I think that Functor is not such a bad name.
The author's central point and most of the arguments they make, throughout, prove the opposite of what they're trying to argue.
The purpose of a name is a pointer
From there we twist in to how ineffective the way we name things is at being a unique pointer. But how unique of a pointer does a name have to be? If that was the primary, only or main focus, our language would reflect that. I wouldn't tell the kids to "open the door" when I'm in the bedroom, I'd tell them to "turn the kwikset lever handle on the master bedroom door". Or I'd use the fancy name for the kind of door (it's got a french name of some kind) we have in our bedroom.
In the first case, I'd be providing unnecessary information. In the second, my use of a unique name to describe a unique door in our home would land in this articles "nirvana", but my kids would stand there confused since they would not be familiar with the term.
Names can't transmit *meaning*
In fact, that an unfamiliar name was used for something where a more common, familiar term was available made understanding what a Functor was much more difficult. Had it been called Mappable, I would have been most of the way there. Upon researching what a "Functor" was, I didn't trust any of the first several, simple, short answers because I assumed "if that's all it is, they wouldn't have used such an obscure name".
So the very use of a name unfamiliar to me conveyed meaning that it must be a much more complicated topic, or they would have used a term that landed on the 80% mark.
 Newspeak, aside.
 I didn't actually struggle with Functor, but that was the author's chosen term to focus on. For me, I think it was Monoid and Monad. I had been using F# for two years before I actually looked up the exact definition of those two terms. Knowing what they meant was, evidently, not important but that they were named something unfamiliar to me didn't immediately make me explore what they meant.