3 ms·
Oh, no, I didn't really question "what could structured mean", nor do the docs explain what "structured" means (https://developer.mozilla.org/en-US/docs/Web/API
by eviks 3y ago
Oh, no, I didn't really question "what could structured mean", nor do the docs explain what "structured" means (https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers...), so what exactly does it succeed in communicating? One thing it succeeds in hiding is the first thing mentioned in the docs - "method creates a deep clone" (funnily enough, linking to an article more appropriately called "Deep copy")
What gave me a pause (and would be part of "yet another bump on the road to intuitive use") is the disconnect between the awareness of the better naming and the choice of a worse one (so, in a sense, this hardest problem has already been solved by other computer scientists!)
- randomdata 3y ago> nor do the docs explain what "structured" means (https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers...) The actual docs do. This second-party attempt to recreate the docs in their own way that you point to has fallen short, I agree. Granted, Mozilla does a better job than some of the other second-party recreations, like Deno's. There is little question that the Javascript ecosystem is a bit of a disaster. That said, I clearly see the caveats right there up front and centre, so even still it has successfully managed to provide you with what the function name wants to bring to your attention.