cacao icon indicating copy to clipboard operation
cacao copied to clipboard

NSMutableArray

Open agg23 opened this issue 11 months ago • 1 comments

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.

agg23 avatar Jul 20 '23 16:07 agg23