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

equality for character types: either let it error out, or implement it properly #213

Open
fingolfin opened this issue Oct 4, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@fingolfin
Copy link
Member

Right now == for generic character (aka character types) is the default Julia one, i.e. using identity ===. This may confuse some users. I think it would be better if this threw a helpful error message.

Even better would be a "proper" equality test, but this might be non-trivial. E.g. arguably these two are equal, but deciding this requires a non-identity re-mapping of the parameters

julia> x = linear_combination([2,1], [T[4],T[4]])

julia> y = linear_combination([1,2], [T[4],T[4]])
@SoongNoonien SoongNoonien added the enhancement New feature or request label Oct 8, 2024
@SoongNoonien
Copy link
Member

Should the simple character types be treated the same here? I think all the nice things mentioned in #214 and the equality could probably be implemented very easily for the simple characters.

@fingolfin
Copy link
Member Author

In which sense do you consider treating them differently? Perhaps your idea is that we could implement a functioning == for simple types rather simply -- so yeah, I'd be fine with having == do something useful for simple types even if it were mapped to error for the "full" types at the same time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants