3 ms·
the slice already exists in this context, that cost is already incurred.
by badrequest 5y ago
the slice already exists in this context, that cost is already incurred.
- skj 5y ago"this context" is using a map from the beginning and not having that slice.
- hamburglar 5y ago“This context” is also not known except one specific way in which the data is accessed, so blithely saying “I’d use a map instead” and being sure that’s the right answer in all cases is pretty uninformed. It helps to assume the person who chose a slice did it for some actual reason and not because they are an idiot.