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

Document in behaviour #647

Open
dpsanders opened this issue May 18, 2024 · 2 comments
Open

Document in behaviour #647

dpsanders opened this issue May 18, 2024 · 2 comments
Labels
1.0 Planned for the major 1.0 release doc

Comments

@dpsanders
Copy link
Member

julia> 3.5  interval(3, 4)
false

This should either work or give me an error message telling me that this is not supported for intervals and telling me which special interval function to use instead (which is not discoverable).

@dpsanders
Copy link
Member Author

Apparently it's in_interval

@OlivierHnt OlivierHnt changed the title Set membership doesn't work Document in behaviour May 19, 2024
@OlivierHnt
Copy link
Member

I took the freedom of re-naming this issue since this behaviour is intentional and has been extensively discussed. In a nutshell, in Julia the function in pertains to containers (which Interval is not); we cannot remove it completely (throw an error) for otherwise some generic functions fail, we cannot overload it with our own definition since this leads to silent errors in generic code.

We should highlight this in the docs, and maybe just add a docstring for in?

@OlivierHnt OlivierHnt added 1.0 Planned for the major 1.0 release doc labels Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.0 Planned for the major 1.0 release doc
Projects
None yet
Development

No branches or pull requests

2 participants