10 votes

Upcoming JavaScript features to watch out for

6 comments

  1. [5]
    dyyyl
    Link
    tl;dr JavaScript is rolling out some pretty cool new language features in the next couple months, including: Optional Chaining Nullish Coalescing Pipeline Operator To be honest, I'm most excited...

    tl;dr JavaScript is rolling out some pretty cool new language features in the next couple months, including:

    • Optional Chaining
    • Nullish Coalescing
    • Pipeline Operator

    To be honest, I'm most excited for the pipeline operator - having real composition without callback hell is going to be a dream come true.

    7 votes
    1. [2]
      Comment deleted by author
      Link Parent
      1. dyyyl
        (edited )
        Link Parent
        Totally! I really like that the language is starting borrowing from languages like C# and elixir - not too much hand holding, but enough sugar to let developers thrive.

        Totally! I really like that the language is starting borrowing from languages like C# and elixir - not too much hand holding, but enough sugar to let developers thrive.

        3 votes
    2. teaearlgraycold
      Link Parent
      Having written a bit of Elixir, a pipeline operator is great. I wish more languages (Python in particular) would include it. But it's not too hard to implement a pipeline helper yourself.

      Having written a bit of Elixir, a pipeline operator is great. I wish more languages (Python in particular) would include it. But it's not too hard to implement a pipeline helper yourself.

      2 votes
    3. [2]
      GoingMerry
      Link Parent
      I find the pipeline to be ugly and hard to type. I agree that it'll be valuable, but ugh, that syntax.

      I find the pipeline to be ugly and hard to type. I agree that it'll be valuable, but ugh, that syntax.

      1 vote
      1. dyyyl
        Link Parent
        My answer to this kinda syntax is usually just to make a snippet for it in vscode (though I'm sure you can use the same tactic for any other editor). I'm imagining something like |*x as a trigger,...

        My answer to this kinda syntax is usually just to make a snippet for it in vscode (though I'm sure you can use the same tactic for any other editor).

        I'm imagining something like |*x as a trigger, with x corresponding with the number of steps you'd like to take. Then you can just tab through at your leisure!