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

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 | Lists | API | Security | Legal | Apply to YC | Contact

Search: