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

use === and !== instead == and != #387

Merged
merged 1 commit into from
Mar 10, 2015
Merged

use === and !== instead == and != #387

merged 1 commit into from
Mar 10, 2015

Conversation

popomore
Copy link
Contributor

@popomore popomore commented Mar 7, 2015

Split PR from #383

Based on #385 and #386, merge this PR after that.

@popomore popomore mentioned this pull request Mar 7, 2015
6 tasks
@jlongster
Copy link
Contributor

Same thing happened here, it's showing 3 commits for some reason.

@popomore
Copy link
Contributor Author

popomore commented Mar 9, 2015

It has been rebased.

@@ -511,7 +511,7 @@ var Compiler = Object.extend({
var name = target.value;
var id = frame.lookup(name);

if (id == null) {
if (id === null || id === undefined) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm actually open to still using == for checking null/undefined. It gets annoying to always have to check for both, and once you learn that == matches both, I don't think its too confusing. That's the only case I'd want to use ==. What do you think (others who see this, feel free to comment too)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The practice leads us to always use === that == will confuse other what is exactly equal to.

But it works fine in this case.

jlongster added a commit that referenced this pull request Mar 10, 2015
use === and !== instead == and !=
@jlongster jlongster merged commit 2a2a31f into master Mar 10, 2015
@jlongster
Copy link
Contributor

Thanks!

@popomore popomore deleted the eqeqeq branch March 10, 2015 16:24
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.

2 participants