3 ms·
Since this is a comment in response to an expressed desire to use macros, I'm curious -- is there some way you could use tagged template literals as a macro sys
by wwweston 8y ago
Since this is a comment in response to an expressed desire to use macros, I'm curious -- is there some way you could use tagged template literals as a macro system? Beyond what eval gives you?
- abecedarius 8y agoThey can't directly substitute for macros because they run when execution reaches them, rather than once at load time, and because they can't inspect their code arguments. But they do satisfy a lot of the desire for syntactic abstraction -- see e.g. https://github.com/erights/quasiParserGenerator https://github.com/erights/quasiParserGenerator