tc39 / proposal-array-unique

ECMAScript proposal for Deduplicating method of Array
138 stars 7 forks source link

This method on typed arrays #20

Open zloirock opened 3 years ago

zloirock commented 3 years ago

Makes it sense or not?

Jack-Works commented 3 years ago

TypedArrays are used to store binary-like data, it is not representing a list of items in the thinking model so I think it is strange to support this on those.

zloirock commented 3 years ago

@Jack-Works they are just optimized for numbers arrays. Sometimes we have arrays of numbers and we should get unique values from those arrays. I think that makes no sense to limit this possibility.

Jack-Works commented 3 years ago

IIRC typed arrays don't have .map, .filter etc, maybe that reason applies here

zloirock commented 3 years ago

They have those methods.

Jack-Works commented 3 years ago

Oh so we should match them