News for hackers. Stuff that matters.
Re:What’s New in ES2019 by jacobwilliamroy on Tuesday July 30, 2019 @08:52AM (#20564328)
I really like the lisp convention of using !'s to indicate mutation. Like set-car! .

In javascript you kind of have to reason backwards and declare your variables as immutable (const). Though there are still some bugaboos; object fields can still be overwritten even if the object was declared with const.

Re:What’s New in ES2019 by bernawil on Tuesday July 30, 2019 @10:10AM (#20564967)
const only means the variable itself can't be reassigned though, and really the main complain about mutation comes from Array methods. Like Array.pop will mutate the array and you have to do an Array.split for the last item instead if you want to keep your array.