Re:Test for lists in Cython
by volta83 on Monday April 19, 2021 @07:32AM
(#26861527)
To add, it is trivial to guarantee that Rust code is "zero-copy", so if this is something you care about, Rust allows your program to fail to compile if it tries to make a copy.
[ Parent
| on HN ]
Godbolt example?
Here you go:
https://play.rust-lang.org/?version=stable&mode=debug&editio...
Because the data structure LotsOfData doesn't implement the Clone trait, attempting to create a copy will fail at compile-time.
OK. I was curious whether it was part of the type system or one of those #[feature] thingies.
https://run.dlang.io/is/jOXfJz is a D equivalent