Hacker News new | ask | show | jobs
by badrequest 1856 days ago
the slice already exists in this context, that cost is already incurred.
1 comments

"this context" is using a map from the beginning and not having that slice.
“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.