Live data from Hacker News

JavaScript Promises Discussion: Make Them Monadic? (2013)

github.com

51–60 of 79 posts

Re: JavaScript Promises Discussion: Make Them Monadic? (2013)

#51
post #49
post #48

I wonder why we have to resort to terms like monadic, immutable, orthagonal, etc, in our field so often. I feel weird and elitist using these terms when more common ones suffice and are understood by my customers.

whats a better term here?

Contextual functions maybe? For orthagonal, it's often used to mean "unrelated". Immutable could be "fixed", "constant" or any number of other more pedestrian terms.

Re: JavaScript Promises Discussion: Make Them Monadic? (2013)

#52
post #48

I wonder why we have to resort to terms like monadic, immutable, orthagonal, etc, in our field so often. I feel weird and elitist using these terms when more common ones suffice and are understood by my customers.

Would you call a car mechanic elitist for talking about carburetors and alternators?

Re: JavaScript Promises Discussion: Make Them Monadic? (2013)

#53
post #48

I wonder why we have to resort to terms like monadic, immutable, orthagonal, etc, in our field so often. I feel weird and elitist using these terms when more common ones suffice and are understood by my customers.

Would you call a car mechanic elitist for talking about carburetors and alternators?

I don't feel like that's a great analogy. "Fuel cell" vs "gas tank" is closer. There's not a simple one or two word commonly used equivalent for carburetor. I'm not opposed to specific terms when there aren't simpler alternatives. "Exponential", for example, doesn't bother me. Orthagonal, though is irritating. Why not just say "unrelated" or "not correlated", etc.

Re: JavaScript Promises Discussion: Make Them Monadic? (2013)

#55
post #38
post #17

I am surprised to see so much venom against Promises expressed here. I am young, but I began coding (as a profession) just when Angular 1 was popular and I remember callback hell was a real thing. A few years later, I use Promises a lot, and they work really well. The way errors bubble is logical and easily controlled, it's almost impossible to throw an unhandled promise exception, doing 'parallel' tasks is easy with…

As already mentioned, they're a lot better than callbacks (well, for certain cases. There are still places where callbacks are better). The problem is that this is a field that has been heavily studied, and there are great solutions to this problem that also solve countless other problems, and interop well with each other. The way promises work, they solve that ONE problem but throw away the rest. If you have the cho…

> There are still places where callbacks are better)

Like? I am genuinely interested in knowing the drawbacks of promises and places where a callback like structure is more favourable. By the way, I am not contradicting you, just trying to learn.

Re: JavaScript Promises Discussion: Make Them Monadic? (2013)

#56
post #36
post #23

Earlier quoted context omitted.

"Once you understand monads, you immediately become incapable of explaining them to anyone else” Lady Monadgreen’s curse ~ Gilad Bracha" If you'd like to go down a rabbit hole of category theory look up the phrase "A monad is just a monoid in the category of endofunctors, what's the problem?" - a fun quote that a lot of monad explanatory tutorials will quip. Not that it will help - because anyone writing a monad expl…

Because the point is mostly lost on the unrelated analogies most tutorial writers use. A monad is a mathematical construct. Trying to explain them in terms of what makes sense to you, because your analogy results from your understanding, isn't likely to be more helpful than outright accepting what they represent, mathematically speaking, then putting that to use in your code.

A monad is most simply described as the quantum superposition of the state of being (or not being) a burrito.

Re: JavaScript Promises Discussion: Make Them Monadic? (2013)

#59
post #51
post #49

Earlier quoted context omitted.

whats a better term here?

Contextual functions maybe? For orthagonal, it's often used to mean "unrelated". Immutable could be "fixed", "constant" or any number of other more pedestrian terms.

You're just inventing your own terms no one else uses.

There's a page called "Monad (functional programming)" on Wikipedia https://en.wikipedia.org/wiki/Monad_(functional_programming) suggesting that the term "moand" or "moandic" is widely used and understood.

There's no page called "contextual function."

There's a page called "Orthogonality (programming)" on Wikipedia https://en.wikipedia.org/wiki/Orthogonality_(programming) also suggesting that the term "orthogonal" is widely used and understood.

The page for "Unrelated" is about a movie.

There's a page called "Immutable Object" on Wikipedia https://en.wikipedia.org/wiki/Immutable_object suggesting that the term "immutable" is widely used and understood.

"Fixed" and "constant" have distinctly different meanings from "immutable."

Re: JavaScript Promises Discussion: Make Them Monadic? (2013)

#60
post #59
post #51

Earlier quoted context omitted.

Contextual functions maybe? For orthagonal, it's often used to mean "unrelated". Immutable could be "fixed", "constant" or any number of other more pedestrian terms.

You're just inventing your own terms no one else uses. There's a page called "Monad (functional programming)" on Wikipedia https://en.wikipedia.org/wiki/Monad_(functional_programming) suggesting that the term "moand" or "moandic" is widely used and understood. There's no page called "contextual function." There's a page called "Orthogonality (programming)" on Wikipedia https://en.wikipedia.org/wiki/Orthogonality_(pro…

I do respect your viewpoint. But immutable and orthagonal are just weird jargon to my project managers, product managers, analysts, customers, etc. For me, it's somewhat equivalent to odd terminology that probably irritates you from the business like "synergy" or "paradigm", or "incentivise" From the tech side, we parody those terms. Rest assured, business folks parody us for our monads, immutables, etc. It makes us seem like we're trying to feel self important.

Wikipedia isn't really convincing to me. There's no page for contextual functions because it's not really new, exciting, unique, or notable. I feel the same if you call that "monads". I can implement them in decades old programming languages. Same for immutable. Existed long before anyone called it that. We used it without having to have some catchy moniker that nobody understood outside the family.

Basically, I want to stop alienating project managers, product managers, and customers with weird jargon.

Post reply on HN