3 ms·
While I am extremely excited that these may someday make it into the language, I actually would be fine with `.hashCode` and `.equals` on the Object prototype.
by nobleach 3y ago
While I am extremely excited that these may someday make it into the language, I actually would be fine with `.hashCode` and `.equals` on the Object prototype.
structuredClone, if I'm not mistaken also allows cloning functions/Maps/Sets, so while there may be some overlap, I'm not sure having Records and Tuples solves the same problems. Or as nerdy engineers are so prone to say, they're "orthogonal".
- moritzwarhier 3y ago> if I'm not mistaken also allows cloning functions/Maps/Sets Map and Set yes, but not functions. Makes sense because there is no reasonable way to serialize functions in JS. https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm#supported_types https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers... edit: I have no idea what actually happens to cloned maps with function values or keys though...