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

instanceof operator considered harmful #41

Closed
kumavis opened this issue Feb 20, 2015 · 0 comments · Fixed by #42
Closed

instanceof operator considered harmful #41

kumavis opened this issue Feb 20, 2015 · 0 comments · Fixed by #42

Comments

@kumavis
Copy link
Contributor

kumavis commented Feb 20, 2015

If my deps use two slightly different versions of bignum, we end up with two different instances of the BigNum class and they are not compatible b/c the instanceof checking fails here.

Another approach is to analyze an instance via a type checking method BigNum.isBigNum(num)

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 a pull request may close this issue.

1 participant