I feel like I'll have to read up some more to have the background to fully understand the article but one thing I wanted to point out is a difference between `fn rand_int(rand: &mut Random) -> i64` and `fn rand_int(ran: Random) -> (i64, Random)`, at least in Rust. With the version that moves `Random`, the return type is bigger and may spill over from registers to the stack which may cause a significant slow down, more than the code of Vale's generation check, I suspect.<p>I've run into this with my parser combinator library, winnow [0], and am considering switching from the nicer functional model of moving to the more imperative model of `&mut` [1].<p>[0]: <a href="https://docs.rs/winnow/latest/winnow/" rel="nofollow">https://docs.rs/winnow/latest/winnow/</a><p>[1]: <a href="https://github.com/winnow-rs/winnow/issues/72">https://github.com/winnow-rs/winnow/issues/72</a>
This is really interesting verdagon, thank you.<p>I wrote a multithreaded reference passing implementation that runs at runtime. If you have the reference you can use it, the condition is that you have to give it back when you're finished with it.
can't believe he managed to get though this entire article without once mentioning the artifact by name. its called the rosetta stone and its currently held in the ancient history museum of London. definitely worth seeing in person.
> If you've used a language like Rust before, this might feel familiar: own-lending is semantically equivalent to borrowing a &mut Random and passing it around.<p>Is this a typo? I trust the author meant `Random` by move, or are they speaking to low level behavior where moves are elided to nothing where possible (and thus looks like a borrow)