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

Switch to mutations instead of copy #89

Open
Maggi64 opened this issue Apr 7, 2023 · 1 comment
Open

Switch to mutations instead of copy #89

Maggi64 opened this issue Apr 7, 2023 · 1 comment

Comments

@Maggi64
Copy link
Owner

Maggi64 commented Apr 7, 2023

Every function except `set' creates and returns a new array. I've done this to be consistent, but it doesn't always make sense.
To improve performance, we could switch to in-place mutations where it makes sense. These would be break changes.

Possible candidates:

  • shuffle
  • sort
  • merge

Suggestion by acorn1010 #80

I am not sure yet. I would love to get some input on this.

@Maggi64 Maggi64 changed the title Switch to array mutations instead of copy Switch to mutations instead of copy Apr 7, 2023
@Camo30
Copy link

Camo30 commented Jun 30, 2023

I prefer immutability over mutations. Many other libraries are using immutabilty so I think that's the way to go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants