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

[Proposal]Handling zero or negative. #102

Closed
meian opened this issue Feb 7, 2022 · 1 comment · Fixed by #103
Closed

[Proposal]Handling zero or negative. #102

meian opened this issue Feb 7, 2022 · 1 comment · Fixed by #103
Assignees
Labels
breaking changes Has breaking changes improvement Some improvement

Comments

@meian
Copy link
Owner

meian commented Feb 7, 2022

Proposal.

Like strings.Repeat, change so func ends with panic by invalid zero or negative arguments.

Breaking change targets are below.

  • panic by negative num
    • Repeat
    • RepeatIterable
    • Take
    • TakeLast
    • Skip
    • SkipLast
  • panic by zero
    • Range
      • change interface with no error.

What benefit with the proposal?

Understand easily for arguments ristriction and can approach to golang standard.

Others

strings.Repeat

@meian meian added improvement Some improvement breaking changes Has breaking changes labels Feb 7, 2022
@meian meian changed the title [wip][Proposal]Handling zero or negative. [Proposal]Handling zero or negative. Feb 8, 2022
@meian meian self-assigned this Feb 8, 2022
meian added a commit that referenced this issue Feb 8, 2022
meian added a commit that referenced this issue Feb 8, 2022
meian added a commit that referenced this issue Feb 8, 2022
meian added a commit that referenced this issue Feb 8, 2022
meian added a commit that referenced this issue Feb 8, 2022
meian added a commit that referenced this issue Feb 8, 2022
meian added a commit that referenced this issue Feb 8, 2022
meian added a commit that referenced this issue Feb 8, 2022
@meian
Copy link
Owner Author

meian commented Feb 8, 2022

#103 (comment)
ゼロ値でパニック起こさせるのは危なさそうなのでRangeの修正は止めた

@meian meian closed this as completed in #103 Feb 8, 2022
meian added a commit that referenced this issue Feb 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking changes Has breaking changes improvement Some improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant