We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Here is PartialEq trait definition: https://github.com/starkware-libs/cairo/blob/main/corelib/src/traits.cairo#L55-L60
PartialEq
For some reason, the methods of this trait take their arg as snapshot, while all other trait takes them as value:
PartialOrd
Add
Is there a reason for this special treatment? We should be coherent across the core lib so I suggest changing the trait definition to
pub trait PartialEq<T> { fn eq(lhs: T, rhs: T) -> bool; fn ne(lhs: T, rhs: T) -> bool { !Self::eq(lhs, rhs) } }
I don't know what it implies in terms of breaking changes. Maybe those can be mitigated from a dev perspective by the use of implicit deref...
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Here is
PartialEq
trait definition:https://github.com/starkware-libs/cairo/blob/main/corelib/src/traits.cairo#L55-L60
For some reason, the methods of this trait take their arg as snapshot, while all other trait takes them as value:
PartialOrd
https://github.com/starkware-libs/cairo/blob/main/corelib/src/traits.cairo#L86-L91Add
https://github.com/starkware-libs/cairo/blob/main/corelib/src/traits.cairo#L10-L12and so on
Is there a reason for this special treatment?
We should be coherent across the core lib so I suggest changing the trait definition to
I don't know what it implies in terms of breaking changes. Maybe those can be mitigated from a dev perspective by the use of implicit deref...
The text was updated successfully, but these errors were encountered: