Hacker News new | past | comments | ask | show | jobs | submit login

The pitfall being that this approach only works with string arguments. Having some Ruby experience, I don't like any of the JavaScript DSLs using template strings for function invocation so far (like styled-components and graphql), and would rather just use macros:

- Sweet.js: https://jlongster.com/Stop-Writing-JavaScript-Compilers--Mak...

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




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

Search: