You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So it occurred to me that we already have this feature (or at least a read-only version of it). It would just be nice to make it a little more accessible. Specifically, if I want to get a slice of an array, I can just clone the array and change the bounds
Unfortunately, this is (1) incredibly verbose and (2) unidirectional. That is, changes to arr will be reflected in slice but not the other way around. We could pretty easily make a slice proxy object which allows bidirectional modification. The slice object would have mutable indices but would not have push or pop capabilities.
The text was updated successfully, but these errors were encountered:
Note that we would need to consider the impact of this issue with #32. Specifically, it would be nice to be able to slice into the #32 limited object as well.
So it occurred to me that we already have this feature (or at least a read-only version of it). It would just be nice to make it a little more accessible. Specifically, if I want to get a slice of an array, I can just clone the array and change the bounds
Unfortunately, this is (1) incredibly verbose and (2) unidirectional. That is, changes to
arr
will be reflected inslice
but not the other way around. We could pretty easily make a slice proxy object which allows bidirectional modification. The slice object would have mutable indices but would not have push or pop capabilities.The text was updated successfully, but these errors were encountered: