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

Remove unnecessary variable declaration. #1687

Merged
merged 1 commit into from
Jun 16, 2014
Merged

Remove unnecessary variable declaration. #1687

merged 1 commit into from
Jun 16, 2014

Conversation

braddunbar
Copy link
Collaborator

Since the two styles are functionally equivalent, I find it easier to distinguish local variables from arguments when they're declared the first time they're assigned to. Thoughts?

@akre54
Copy link
Collaborator

akre54 commented Jun 16, 2014

Yeah this feels more consistent with the rest of the codebase. I like this style a bit more.

@jdalton
Copy link
Contributor

jdalton commented Jun 16, 2014

I prefer this PR's style too. I used to be "hoist all the vars" but over time found it more beneficial to var-up on first use. When I hoisted I tended to initialize values, however many times that meant doing the leg work for vars that weren't used in a given fork.

@jashkenas
Copy link
Owner

This is how it used to be ... but things sneak in over time...

jashkenas added a commit that referenced this pull request Jun 16, 2014
Remove unnecessary variable declaration.
@jashkenas jashkenas merged commit 45a7c0e into jashkenas:master Jun 16, 2014
@braddunbar braddunbar deleted the style branch June 16, 2014 19:59
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

Successfully merging this pull request may close these issues.

4 participants