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
About the new alias syntax {{#each items item, @index index}} #3225
Comments
+10 ...I think too removing the |
I don't disagree. When originally proposing the feature, I got a good bit of pushback based on the verbosity of it, which is fair. This is somewhat of a compromise on that front. For context, the I think leaving out the optional keywords has a place. For instance, when playing with the feature during development, I found that I prefer to drop them. I also like to drop them where they don't add necessary padding with larger alias blocks e.g. As far as maintainability of the Ractive internals, this part of the change only affected one or two lines, and if I remember correctly, is actually less code now because it doesn't have to reset the parser position and bail if it doesn't match. If there is pretty universal hatred for dropped |
Thanks for the replies, I have no problem from my perspective, since I'll be using
Agreed, that was a very good idea! |
If nobody else has strong feelings about this, feel free to close the issue. I've been using |
My strongest feeling is that a lot of stuff is a bit overloaded syntactically and can get confusing. I think we got a little outside the capabilities of handlebars. I've been looking at how best to some that for 2.0 without also making migration a pain. It's tough, and I don't really have a solution so far other than possibly supporting two flavors of template that parse down to the same ast. |
I want to specify my point of view to increase the contrast for the below claim:
It also introduces a lot more confusion for me (oldcomers) while reading someone else's code who prefers omitting the |
Hi there!
Not sure if this has been already discussed, but I was peeking through the 0.10 Changelog and noticed this new feature:
I'm not sure if it's worth introducing another syntax just to remove the
as
keyword.Wouldn't this complicate the readability/maintenance of the template code or Ractive's internal?
I feel like this is kinda like the "implicit"
{{# something}} .... {{/}}
syntax, which might look appealing, but complicates things on the long run.Having an additional syntax means:
What do you think?
The text was updated successfully, but these errors were encountered: