News for hackers. Stuff that matters.
Re:The Lazy Monad by IshKebab on Tuesday June 07, 2022 @12:01PM (#31656263)
Oh yeah I mixed them up. I still think `Mappable` is a much better name than `Functor`, and names matter. Especially for difficult to understand concepts. Functor isn't really even the right type of word. It should be Functable or something.

Monad should be `FlatMappable`. I found this great article where they use exactly these terms to explain it:

https://dev.to/joelnet/functional-javascript---functors-mona...

If people are using different terms to explain your confusing terminology then... maybe the confusing terminology is not very good.

Re:The Lazy Monad by codebje on Tuesday June 07, 2022 @07:30PM (#31661323)
Names certainly do matter: they're how we effectively communicate with each other. If you call it a mappable, and someone else calls it a chainable (as was said elsewhere in this comment thread), how have we eased confusion? If I try to google what a chainable is, what will I find?

On the other hand, if I say "it's a monad" then people who have encountered the term before know what I mean (even if they've had no need to understand monads in depth) and people who have not will successfully find information about the right thing if they search for it.

Monads have a particularly bad reputation for being hard to learn, despite appearing in non-general form in every modern language. Since people seem to have little trouble grasping the way in which futures, streams, and options work I don't think there's really such a great challenge involved - but the culture of running screaming from the mere word doesn't help matters in the least.

Re:The Lazy Monad by tel on Tuesday June 07, 2022 @11:28PM (#31662850)
I'm not saying functor is a good name. I'm saying it's the name that's more or less stuck. To start using a new one is just to make the terminology even more confusing.

For what it's worth, "functor" properly describes the combination of a type and its relevant .map() function. It's (common) shorthand to refer to just the type as "a functor" when there's a unique, well-known functor that utilizes that type.

So, we could be more precise, of course. But also if you just throw up your hands when someone says "a list is a functor" then you're fighting a difficult battle.

Re:The Lazy Monad by nybble41 on Tuesday June 07, 2022 @12:25PM (#31656675)
"Functor" is a perfectly good and descriptive name… provided you are at least somewhat familiar with the esoteric branch of mathematics it's based on. For someone from a Category Theory background renaming it to "Mappable" would be weird and unintuitive. And as in most things, those actually doing the work get to pick the names that make sense to them.
Re:The Lazy Monad by codebje on Tuesday June 07, 2022 @07:58PM (#31661559)
If you're not even slightly familiar with that branch of mathematics it's still a perfectly good and descriptive name, because you can search for the term and get loads of relevant information from the programming side of things.

(The mathematical basis helping you get deeper insights into it is just a bonus, albeit IMO a valuable one.)