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

Rest in destructuring #14

Open
ehpc opened this issue Jul 27, 2015 · 11 comments
Open

Rest in destructuring #14

ehpc opened this issue Jul 27, 2015 · 11 comments

Comments

@ehpc
Copy link
Contributor

ehpc commented Jul 27, 2015

Hi!
You've grouped destructuring kata into rest parameter syntax. But I think it's not correct, because in case of destructuring you are not using rest syntax, you are using spread operator instead. It just happens that spread can behave similarly to the rest syntax. In specs it is called SpreadElement http://www.ecma-international.org/ecma-262/6.0/#sec-array-initializer. And Mozilla thinks the same https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator.

@wolframkriesing
Copy link
Collaborator

@ehpc
Copy link
Contributor Author

ehpc commented Jul 27, 2015

Yep

@wolframkriesing
Copy link
Collaborator

you are absolutely right, thanks for bringing those things up. I think about how to not break things and will try to employ it, ideas/PRs welcome.

@ehpc
Copy link
Contributor Author

ehpc commented Jul 28, 2015

What exactly are you afraid to break?

@wolframkriesing
Copy link
Collaborator

all the links on http://es6katas.org/ depend on it, esp this one (which might also be used in tweets or other places, at least I did) will change
http://tddbin.com/#?kata=es6/language/destructuring/rename
and having this in place might also make changes in the future safer, legacy decision :)

@ehpc
Copy link
Contributor Author

ehpc commented Jul 28, 2015

If you are running Apache, you can use something like mod_rewrite with .htaccess to redirect users to a new url without deleting the old one.

@wolframkriesing
Copy link
Collaborator

yep, if I did :) but it's currently all just a static page on github :)
but i can start changing the description, thats a start

@ehpc
Copy link
Contributor Author

ehpc commented Jul 28, 2015

Well I don't think github has something like rewrite, so the only solution that comes to mind is moving your site to a separate hosting provider :) Or maybe just setting up a hosting as a proxy redirecting links to github as necessary.

@wolframkriesing
Copy link
Collaborator

@ehpc
Copy link
Contributor Author

ehpc commented Jul 28, 2015

It's better, but still a little confusing. I would say something like "assign object property values to new variables while destructuring" sounds more to the point. And "use a colon after the property name, like so propertyName: newName".

@wolframkriesing
Copy link
Collaborator

thanks!

Kind regards / Saludos / Mit freundlichen Grüßen
Wolfram Kriesing, uxebu Co-Founder

[email protected], mobile: +49 174 300 4595

Learn ES6, one kata a day http://es6katas.org

uxebu GmbH
Goethestraße 28
86161 Augsburg

Amtsgericht Augsburg, Handelsregister HRB 28613
Directors: W. Kriesing, T. v. Klipstein

On Tue, Jul 28, 2015 at 12:57 PM, Eugene Maslovich <[email protected]

wrote:

It's better, but still a little confusing. I would say something like
"assign object property values to new variables while destructuring" sounds
more to the point. And "use a colon after the property name, like so propertyName:
newName".


Reply to this email directly or view it on GitHub
#14 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants