rust-simplicity icon indicating copy to clipboard operation
rust-simplicity copied to clipboard

rename `shallow_clone` to `handle`?

Open apoelstra opened this issue 1 month ago • 0 comments
trafficstars

Maybe better off as a discussion.

See https://smallcultfollowing.com/babysteps/blog/2025/10/07/the-handle-trait/

This describes a trait which is almost exactly our shallow_clone idiom which we use in this crate and others to try to distinguish "real clones" from "arc clones". The blog post observes that what's important about a shallow clone isn't that it's cheap, necessarily, but that it yields a "handle" to the original object rather than an indepndent copy. I think our word "shallow" is better but if the ecosystem moves toward different terminology we should follow.

apoelstra avatar Oct 10 '25 14:10 apoelstra