logoalt Hacker News

jdw64yesterday at 11:26 AM2 repliesview on HN

Sorry, should clarify. .clone() itself isn't inherently unidiomatic when used .

My issue is specifically with how the AI uses it. In AI code, .clone() is almost always used as a brute-force escape hatch


Replies

iziettoyesterday at 11:37 AM

Just like for me as an amateur Rust enjoyer then

andaiyesterday at 11:35 AM

So .clone() significantly reduces the mental overhead of using rust with a small performance impact? I'm intrigued :)

Maybe it's harder to reason about the lifetime semantics while also writing code, and works better as a second phase (the de-cloning).

show 1 reply