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
Is there a particular reason why NSArray is being used, and not NSMutableArray? The pattern for NSDictionary was to use the mutable variant, and unless we're worried about the perf impact of the mutable type (which I think is negligible, especially given what this code is doing), I think that NSMutableArray should be used instead.
The only problem I foresee with this (and NSMutableDictionary has the same issue) is if a caller receives a immutable type through an API call, we cast it on the Rust side to be mutable, which means users can call insert or whatever on them.
The text was updated successfully, but these errors were encountered:
Similar to #99, some of the thinking that went into these is dated by now and I'm open to changing things up. Offhand I can't think of a particular reason why NSMutableArray couldn't be used instead - I've vague memories of tinkering with it and honestly forget why I backed away.
Which means there very well could be a reason, but the best way at this point to determine it is just to branch/alter the code and see how it goes.
Is there a particular reason why
NSArray
is being used, and notNSMutableArray
? The pattern forNSDictionary
was to use the mutable variant, and unless we're worried about the perf impact of the mutable type (which I think is negligible, especially given what this code is doing), I think thatNSMutableArray
should be used instead.The only problem I foresee with this (and
NSMutableDictionary
has the same issue) is if a caller receives a immutable type through an API call, we cast it on the Rust side to be mutable, which means users can callinsert
or whatever on them.The text was updated successfully, but these errors were encountered: