blog.sdf.com/p/fast-development-in-rust-part-one/comment/51726774

Preview meta tags from the blog.sdf.com website.

Linked Hostnames

2

Thumbnail

Search Engine Appearance

Google

https://blog.sdf.com/p/fast-development-in-rust-part-one/comment/51726774

Bo Lin on SDF Blog

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 on SDF Blog

https://blog.sdf.com/p/fast-development-in-rust-part-one/comment/51726774

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

https://blog.sdf.com/p/fast-development-in-rust-part-one/comment/51726774

Bo Lin on SDF Blog

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

    17
    • title
      Comments - Fast Development In Rust, Part One
    • title
    • title
    • title
    • title
  • Open Graph Meta Tags

    7
    • og:url
      https://blog.sdf.com/p/fast-development-in-rust-part-one/comment/51726774
    • og:image
      https://substackcdn.com/image/fetch/$s_!ojn5!,f_auto,q_auto:best,fl_progressive:steep/https%3A%2F%2Fsdfteam.substack.com%2Ftwitter%2Fsubscribe-card.jpg%3Fv%3D-1147005067%26version%3D9
    • og:type
      article
    • og:title
      Bo Lin on SDF Blog
    • og:description
      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.
  • Twitter Meta Tags

    8
    • twitter:image
      https://substackcdn.com/image/fetch/$s_!ojn5!,f_auto,q_auto:best,fl_progressive:steep/https%3A%2F%2Fsdfteam.substack.com%2Ftwitter%2Fsubscribe-card.jpg%3Fv%3D-1147005067%26version%3D9
    • twitter:card
      summary_large_image
    • twitter:label1
      Likes
    • twitter:data1
      3
    • twitter:label2
      Replies
  • Link Tags

    30
    • alternate
      /feed
    • apple-touch-icon
      https://substackcdn.com/image/fetch/$s_!dn7r!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad1c5600-cc11-4848-93da-dcc17bef518d%2Fapple-touch-icon-57x57.png
    • apple-touch-icon
      https://substackcdn.com/image/fetch/$s_!myL3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad1c5600-cc11-4848-93da-dcc17bef518d%2Fapple-touch-icon-60x60.png
    • apple-touch-icon
      https://substackcdn.com/image/fetch/$s_!9zb0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad1c5600-cc11-4848-93da-dcc17bef518d%2Fapple-touch-icon-72x72.png
    • apple-touch-icon
      https://substackcdn.com/image/fetch/$s_!Ctor!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad1c5600-cc11-4848-93da-dcc17bef518d%2Fapple-touch-icon-76x76.png

Links

13