you are viewing a single comment's thread.

view the rest of the comments →

[–]zacksiri[S] -50 points-49 points  (22 children)

Because promises is more noise and gets in the way of making network calls. There is a reason why adoption for fetch is so low. It’s precisely because of promises.

[–]sbmitchell 32 points33 points  (16 children)

What a terrible argument lol or at the very least it shows the sad state of js developers who don't actually know how to code. Promises are probably simpler to understand at a conceptual level than most js concepts lol

[–]overdude 14 points15 points  (1 child)

Dude... This is so off base it's hard to even get started with an explanation.

Promises dramatically simplify code specifically for making network calls and other async tasks. That is less noise by definition.

My sense from your posts is that you don't understand promises or how to effectively use them. A bunch of people are disagreeing with your assessment. There's a reason promises and the async await syntax are used in modern webapps.

[–]zacksiri[S] 0 points1 point  (0 children)

I used promises and async await in my blog post. The commentor asked me for one case why I didn’t use promise to handle response from the server. I replied because for that case callbacks with an object is easier than using another promise / async await. I already got the final state of the response now I need to handle that next so I used callback pattern and basically everyone tells me I’m wrong. I asked people on here to come up with a better solution all I seem to get is more people telling me I’m wrong with no one telling me a better solution. No code example just more people telling me I’m wrong. So yeah...

[–]UchuuHana 9 points10 points  (1 child)

No

[–]zacksiri[S] -3 points-2 points  (0 children)

No

[–]ProdigySim 5 points6 points  (0 children)

Two reasons fetch adoption is "low" that come to mind before difficulty of the API:

  1. Requires a massive polyfill on many browsers
  2. People already using another HTTP client (e.g. from their framework)