Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It is a little bit of a shame that it doesn't seem to be under active development anymore. For personal projects, it would be fun to be able to write up little DSLs


It seemed to undergo a major rewrite and then died.

I could also never really figure it out post-rewrite. Pre-rewrite, I had made some cool macros just out of intuition after reading some of its examples. Now, I can't get many of its own examples to compile in its live editor.

Too bad. It's about 1000x simpler than, say, implementing low-level Babel transformations.


I feel the pain. Things got a little bit easier with Babel Plugin Macros and Typescript (which forces you to build macros that adhere to a reasonable type system)


I've only recently learned about Babel Plugin Macros and haven't used it in production - but here are a few links in case anyone's interested.

https://babeljs.io/blog/2017/09/11/zero-config-with-babel-ma...

https://github.com/kentcdodds/babel-plugin-macros

https://github.com/jgierer12/awesome-babel-macros

These "macros" take a different approach than Sweet.js: they're not syntax extensions, but rather code transformers that you import and use explicitly.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: