New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Curly braces for value interpolation #152
Comments
Thanks for opening this issue! Hmm. The way my eyes see it is: "If there's a string literal (i.e. "my-class") then it's a string.. otherwise it's an identifier". Then with blocks it would be something in the realm of "if there's a block its not a string literal, otherwise it's a string literal". And to me, both of those seem like the same level of reading-complexity. So, for me requiring blocks seems like unnecessary boilerplate (block expressions are supported today but not required for a single identifier). I'm wondering whether or not blocks just make it more familiar to React developers where blocks are required (probably?) since the JS world doesn't have something like syn. Also not very versed in syntax highlighting.. But I think a highlighter would know decide how to highlight based on the token type. In this case, an Just my thoughts! |
Looking over the example:
I think that requiring curly braces, similar to how React does:
...Would be a bit more readable for the developer, and while I'm not so familiar with how syntax highlighters are built, I imagine knowing to expect
{...}
would be helpful for those tools too.The text was updated successfully, but these errors were encountered: