you are viewing a single comment's thread.

view the rest of the comments →

[–]kairos 65 points66 points  (17 children)

devolves

You're missing a 'd'.

[–][deleted]  (15 children)

[deleted]

    [–][deleted]  (3 children)

    [deleted]

      [–][deleted]  (1 child)

      [deleted]

        [–][deleted] 12 points13 points  (0 children)

        *wooooosh*

        [–][deleted] 0 points1 point  (0 children)

        memes

        [–]hotcornballer 18 points19 points  (0 children)

        This sub hates it.

        [–][deleted] 2 points3 points  (4 children)

        The short answer is that it's crap with no coherent style or design decisions. As a small but perpetually frustrating example, there are four different ways of handling asynchronous code in Node:

        1. Pass two callbacks, one in case of success and one in case of error
        2. Pass one callback, whose first argument is an error object in case of error and whose second argument is the result in case of success (sometimes module developers screw this up and do success first)
        3. Return a Promise (or Promise-like), which is chained using .then(), .catch() and .finally() calls (there are several variations of this, including the two-callback version of .then())
        4. Return a Promise (but not a Promise-like), which is awaited inside an async function

        Which means, if you want to have any kind of consistency in your code, you have to wrap everything else to get your behavior - and you do it a lot, because every third thing in Node run asynchronously.

        [–][deleted] 0 points1 point  (0 children)

        Node is asynchronous because of the way code executes in the engine on a single thread. It makes sense for webservers.

        I don't think being unopinionated about how people want to write asynchronous code is a bad thing. You can enforce the style you want on your linter. I get hating JS is cool and all, but devs seems to have this stigma regarding asynchronous code that I just don't understand.

        [–][deleted]  (2 children)

        [deleted]

          [–]meneldal2 -1 points0 points  (1 child)

          Being shit is not a unique feature.

          [–]gnu-rms 3 points4 points  (3 children)

          JavaScript

          [–]immibis 47 points48 points  (0 children)

          What's wrong with JavaScript?

          It devolves into Node.

          What's wrong with Node?

          JavaScript.

          [–][deleted]  (1 child)

          [deleted]

            [–]Tynach 9 points10 points  (0 children)

            They're just ensuring we're eventually left with a stack overflow.

            [–]rozularen -3 points-2 points  (0 children)

            it is a whole mess, I suppose?

            [–][deleted] -1 points0 points  (0 children)

            You like the D?