-
Notifications
You must be signed in to change notification settings - Fork 6
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
Core/Array: reset #81
Comments
As discussed, this function needs its parameter to be passed by reference. What to do, considering that we're trying to avoid that? I think this is a gotcha but we'd have to do by reference. |
@nkkollaw I don't see any other option that sticking to the reference |
The question is more general - should the wrapper function be pure? If so it means that some native functions (like If the answer is no - I wouldn't bother with passing variables as references. |
In this case, the only purpose of the functions is to modify the element passed, so it kind of makes sense. Implementing without passing by reference wouldn't work IMO. I would definitely add it to the documentation as a gotcha, but I think we should make ot work like the original. |
Its not always the only purpose. For example |
Definitely. I meant that if you take that aspect away, the function doesn't make much sense. |
No description provided.
The text was updated successfully, but these errors were encountered: