
substack.com/@bolinirl/note/c-51726774
Preview meta tags from the substack.com website.
Linked Hostnames
1Thumbnail

Search Engine Appearance
Bo Lin (@bolinirl)
Yes, that ultimately comes down to how hot the code path is and the asymptotic complexity of the `clone` method itself, which are very much influenced by the nature of your application. What we're saying is that, in the context of "fast development", it's a beneficial mental model to treat cloning as cheap and expendable, *until proven otherwise*. Perhaps a direct corollary here is that it would generally be a good idea to design your datastructures *such that* clones are as cheap as possible (e.g. by making it shallow), since `Clone` is such an integral part of Rust ownership model. That way you set it up so you can use clone "guilt-free" to satisfy the borrow checker, while relegating the deep copy to an explicit method for those (much rarer) cicurmstances that needs it.
Bing
Bo Lin (@bolinirl)
Yes, that ultimately comes down to how hot the code path is and the asymptotic complexity of the `clone` method itself, which are very much influenced by the nature of your application. What we're saying is that, in the context of "fast development", it's a beneficial mental model to treat cloning as cheap and expendable, *until proven otherwise*. Perhaps a direct corollary here is that it would generally be a good idea to design your datastructures *such that* clones are as cheap as possible (e.g. by making it shallow), since `Clone` is such an integral part of Rust ownership model. That way you set it up so you can use clone "guilt-free" to satisfy the borrow checker, while relegating the deep copy to an explicit method for those (much rarer) cicurmstances that needs it.
DuckDuckGo

Bo Lin (@bolinirl)
Yes, that ultimately comes down to how hot the code path is and the asymptotic complexity of the `clone` method itself, which are very much influenced by the nature of your application. What we're saying is that, in the context of "fast development", it's a beneficial mental model to treat cloning as cheap and expendable, *until proven otherwise*. Perhaps a direct corollary here is that it would generally be a good idea to design your datastructures *such that* clones are as cheap as possible (e.g. by making it shallow), since `Clone` is such an integral part of Rust ownership model. That way you set it up so you can use clone "guilt-free" to satisfy the borrow checker, while relegating the deep copy to an explicit method for those (much rarer) cicurmstances that needs it.
General Meta Tags
14- titleBo Lin (@bolinirl): "Yes, that ultimately comes down to how hot the code path is and the asymptotic complexity of the `clone` method itself, which are very much influenced by the nature of your application. What we're saying is that, in the context of "fast development", it's a beneficial mental mo…"
- title
- title
- title
- title
Open Graph Meta Tags
9- og:urlhttps://substack.com/@bolinirl/note/c-51726774
- og:imagehttps://substackcdn.com/image/fetch/$s_!XCt4!,w_400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack.com%2Fimg%2Freader%2Fnotes-thumbnail.jpg
- og:image:width400
- og:image:height400
- og:typearticle
Twitter Meta Tags
8- twitter:imagehttps://substackcdn.com/image/fetch/$s_!XCt4!,w_400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack.com%2Fimg%2Freader%2Fnotes-thumbnail.jpg
- twitter:cardsummary
- twitter:label1Likes
- twitter:data13
- twitter:label2Replies
Link Tags
18- alternatehttps://substack.com/@bolinirl/note/c-51726774
- apple-touch-iconhttps://substackcdn.com/icons/substack/apple-touch-icon.png
- canonicalhttps://substack.com/@bolinirl/note/c-51726774
- iconhttps://substackcdn.com/icons/substack/icon.svg
- manifest/manifest.json
Links
4- https://substack.com/@bolinirl/note/c-51726774?
- https://substack.com/@bolinirl?
- https://substack.com/@bolinirl?utm_source=substack-feed-item
- https://substack.com/home?