Skip to content
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

[v4] Consider renaming `for` to `each` #577

gilbert opened this Issue Feb 9, 2017 · 1 comment


None yet
3 participants
Copy link

gilbert commented Feb 9, 2017

When users see <for(var x in xs)>, they think it's native JavaScript and try to do fancy ES6 stuff like destructuring.

Here's an actual attempt:

<for(const [airport, { area, name, pos: { lat, lng } }] of Object.entries(geo.airports))>

I have two suggestions (not mutually-exclusive):

  1. Rename for to each to avoid confusion
  2. Give for native JS code support

This would be the last nail in the "uncanny JavaScript-like tags" coffin.


This comment has been minimized.

Copy link

mauricionr commented Feb 24, 2017

Or could be more vue like

for((key, value) in data)//object


for(item in data)//array

Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.