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

Closed
gilbert opened this issue Feb 9, 2017 · 2 comments
Closed

[v4] Consider renaming for to each #577

gilbert opened this issue Feb 9, 2017 · 2 comments
Labels
proposal status:backlog Tasks planned to be worked on type:feature A feature request

Comments

@gilbert
Copy link
Contributor

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.

@mauricionr
Copy link

Or could be more vue like

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

And

for(item in data)//array

Thanks :)

@mlrawlings mlrawlings added proposal status:backlog Tasks planned to be worked on type:feature A feature request labels Sep 29, 2017
@DylanPiercey
Copy link
Contributor

We've switched up the for tag syntax keeping this in mind in #1238

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal status:backlog Tasks planned to be worked on type:feature A feature request
Projects
None yet
Development

No branches or pull requests

4 participants