Threads for dmg

  1. 1

    Atomics is neutered right now in Mozilla. Atomics use SharedArrayBuffer objects. But SharedArrayBuffer has been disabled for now as a mitigation for Spectre.

    1. 1

      You can follow adoption of the pipeline operator here: https://github.com/tc39/proposal-pipeline-operator

      1. 2

        You can name for loops and blocks in JS… who knew (not me)!

        Babel Contracts leverages these to add simple function contracts to js code.

        1. 1

          This one I did know about. It’s the reason () => { pet: 'dog' } returns undefined instead of an object. The curlies are evaluated as enclosing the arrow function block and pet: is evaluated as a label for the expression 'dog' – so without an explicit return, the function returns undefined. If you intended, instead, to implicitly return an object with the property pet, the curlies should be wrapped in parens to denote an expression: () => ({ pet: 'dog' })

          It can also be used to send break to labeled recursive functions. Don’t know whether I like the idea. But it’s interesting.

        1. 5

          Looks great, but I can only imagine the pain it has to be to google for things about it

          1. 2

            Good point. However there are languages like J, K, and Q that manage to grab mindshare. As long as there’s a Wikipedia page you’re halfway there.

            1. 5

              Googling for J is absolutely miserable. J gets you nowhere. J language gets you a few things but also a ton of javascript, java, and julia noise. Jlang gets you languages and libraries called “Jlang”. If you add any descriptor words, like j language reverse array, the noise dominates even more and you’re left with no information at all.

              1. 2

                Microsoft Research’s P lang is another example of this ridiculous single-letter convention. It is worth more than the lousy name it was given.

            1. 3

              The TC39 meeting mentioned in the article has now taken place. Here are the discussion notes: http://tc39.github.io/tc39-notes/2017-11_nov-29.html#9iik-grammar-constraints

              To cut to the chase: the resolution was to “chase with Brendan, Waldemar for their feedback.”

              Incidentally, this meeting also discussed pipelines for Stage 2! yay! (But haven’t yet advanced it to Stage 2.)

              1. 3