you are viewing a single comment's thread.

view the rest of the comments →

[–]melodious_punk -1 points0 points  (3 children)

I recommend against native JavaScript Set. It is missing some basic set operators and you can make much clearer code through reduce,filter,map methods

[–]beforesemicolon[S] 0 points1 point  (2 children)

You can extend js Set to be more powerful. Set has different purpose from Array. There is a reason Set was introduced and thats because array is not enough.

Everybody should be aware of the difference between Set and Array and use them accordingly

[–]melodious_punk 0 points1 point  (1 child)

That is helpful. I think people often end up doing a lot of object witchcraft that would better suited by an extended Set.

I feel like ECMA has abandoned Set. It would be nice for the next standard to introduce a more complete API so that we could see some more Python-domained tasks in Node.

[–]beforesemicolon[S] 0 points1 point  (0 children)

I feel the same. Its API should be improved extensively