Hacker News new | past | comments | ask | show | jobs | submit login

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".




> 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...

edit: I have no idea what actually happens to cloned maps with function values or keys though...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: