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

add ES2015 variables #48

Merged
merged 4 commits into from
Jul 29, 2016
Merged

add ES2015 variables #48

merged 4 commits into from
Jul 29, 2016

Conversation

dotcode
Copy link
Contributor

@dotcode dotcode commented Jul 28, 2016

No description provided.

@dotcode dotcode mentioned this pull request Jul 28, 2016
@hollsk
Copy link
Contributor

hollsk commented Jul 28, 2016

Looks great. Should we also specify strict mode? I don't know what the Shunter convention is, but it's generally recommended elsewhere.

@danyalaytekin
Copy link
Contributor

👍

@rowanmanning
Copy link

Something I'm doing now, which might be worth adding here if you agree, is using const everywhere unless a variable explicitly needs to be modified. It's great for the default state of a variable to be immutable, and I've found that I actually have very little need to use let.

There's some good background here: https://ada.is/blog/2015/07/13/immutable/

dotcode added 2 commits July 29, 2016 11:47
Standard practice is to just use regular camelCase. If you go with the const as default approach then you can assume that everything is immutable and you don’t need a naming convention (not that a naming convention would necessarily be a good idea anyway, unless you have some way to enforce it. They're too easy for people to ignore/forget/be-unaware-of, and then you have the potential for confusion)
@dotcode
Copy link
Contributor Author

dotcode commented Jul 29, 2016

Thanks @rowanmanning - better now?

@dotcode dotcode mentioned this pull request Jul 29, 2016
@dotcode dotcode merged commit 90ee2ff into master Jul 29, 2016
@dotcode dotcode deleted the javascript-es2015-variables branch July 29, 2016 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants