Does anyone on or near TC39 know why Brendan Eich’s proposal to adopt sweet.js-style hygienic macros into JS went nowhere? I remember at Strange Loop 2012 he argued that macros would ‘finish’ JavaScript in the sense it would never need any new syntactic features; I can see some posts from three years later where he was still arguing for it
Ahead-of-time macro expansion can be expensive performance-wise, and JavaScript has a constraint that’s fairly unique among programming languages: time from getting source code to first execution has to be as small as possible.
So already there’s a reason to prefer an external system like Sweet.js where code is shipping in pre-macro-expanded form. Unfortunately Sweet.js nor any other language with macros has caught on in this space – probably because front-end developers are wimps ;-)
Looking at the proposals that have been accepted since ES6, there aren’t a huge number of syntactic additions anyway (async the only really big one). But ‘decorators’ a la Python are coming down the pipeline, and it’s hard (from a Schemer’s perspective) not to see that as a bad alternative to real macros