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

Unify exceptions for out of bounds conditions in core functions #17351

Open
psfinaki opened this issue Jun 26, 2024 · 3 comments
Open

Unify exceptions for out of bounds conditions in core functions #17351

psfinaki opened this issue Jun 26, 2024 · 3 comments
Labels
Area-Library Issues for FSharp.Core not covered elsewhere Feature Request
Milestone

Comments

@psfinaki
Copy link
Member

psfinaki commented Jun 26, 2024

We have 3 different behaviors currently:
X.skip throws InvalidArgOutOfRange when count > n
X.take throws InvalidOperation when count > n
X.sample throws InvalidArg when count > n

We should unify this, updating the code along with RFCs probably.

Originally posted by @Lanayx in #17277 (comment)

@github-actions github-actions bot added this to the Backlog milestone Jun 26, 2024
@vzarytovskii
Copy link
Member

All those will be breaking changes, fwiw.

@psfinaki
Copy link
Member Author

Yeah that's clear, don't expect this to be easy-breezy 🤷

@T-Gro T-Gro added Area-Library Issues for FSharp.Core not covered elsewhere Feature Request and removed Needs-Triage labels Jul 8, 2024
@T-Gro
Copy link
Member

T-Gro commented Jul 8, 2024

Agree, should be InvalidArgOutOfRange for all 3 APIs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Library Issues for FSharp.Core not covered elsewhere Feature Request
Projects
Status: New
Development

No branches or pull requests

3 participants