Yes, they solve the same general problem of "adding" macros to JavaScript, but they approach it differently. To begin with, each of them has a different syntax for defining macros. I don’t understand if any standard is suitable. Sweet.js is standalone, and babel-plugin-macro is the Babel plugin. I would suggest that you can use them as part of the same toolchain, and people can do this if they prefer Sweet.js. However, it may be much easier to use the Babel plugin if it already uses Babel.
I would be careful to go too deep into this, as there is no standard for JavaScript yet. This will likely lead to headaches in terms of the source working correctly, especially when combining Sweet.js with Babel.
, ( Sweet.js) JavaScript. ECMAScript.
UPDATE
- , , Sweet.js Babel , , , . . http://sweetjs.org/doc/1.0/tutorial.html#_babel_backend