You can think of sweet.js like a modular compiler. Let's say you wanted to use the @ syntax or the -> function syntax from coffeescript. Include a macro that does it rather than build a full compiler to do it. Coffeescript could then be a collection of macros rather than it's own compiler. Those macros could be shared across other projects or you can pick one or two for a lightweight Coffeescript-esque experience without having to port your whole codebase.
There's a point where I think this breaks down. It's great for syntactic sugar but I think things like type analysis would become a bit more difficult.
There's a point where I think this breaks down. It's great for syntactic sugar but I think things like type analysis would become a bit more difficult.