The idea is to provide a middle ground between no syntax extension and having to build an entire compile-to-js language like CoffeeScript, which can’t compose with other syntax extensions.
I talk a bit about the motivation and design in this presentation I gave at the end of my internship.
The language that most directly inspires sweet.js is, of course, scheme. I’m not really much of a schemer myself but have always admired the fancy work going on in that world and macros are pretty fancy. At the start of the summer I was still somewhat of a macro newbie but being at Mozilla was fantastic since I was able to draw on and learn from two well-versed scheme macrologists Dave Herman (who’s PhD thesis was on macros) and Paul Stansifer (who has been developing the Rust macro system).
Sweet.js is still in very early stages, lots of bugs and missing features, but I think it shows some real promise. Let me know what you think!blog comments powered by Disqus