-
Notifications
You must be signed in to change notification settings - Fork 36
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
Consider optimizing .equals()
operations
#455
Comments
Just to document a couple of remarks from the Skype discussion:
|
Not sure why 2. would be the case. the optimization would be an implementation of |
Well that's because this:
suggests that it's the test that changes, not the implementation of equals, although I guess that could be done as well, Wrapping the code inside the equals in an |
If we put that optimisation as inserted code at the beginning of each |
Will wait for M4. |
Optims for M5. |
Moving to M6 |
Moving to 1.2 |
One use case for identity comparison in Java is to optimize
.equals()
implementations. If two instances are identical identity wise, they must be equal.The compiler could enforce that automatically so that this use case for Ceylon's
===
is no longer needed.Ceylon
a == b
would become in Java(a==b) || a.equals(b)
The text was updated successfully, but these errors were encountered: