3 ms·
This was extensively discussed on reddit and a few other places (not HN afaik, or I couldn't find the thread), after the video^ Jonathan Blow posted on the topi
by wokwokwok 8y ago
This was extensively discussed on reddit and a few other places (not HN afaik, or I couldn't find the thread), after the video^ Jonathan Blow posted on the topic.
I think the tldr; is, opinions vary.
Using indexes manually doesn't by-pass the borrow checker, its just a different, manual, memory allocation and management strategy.
It preserves memory-safety, but, it's questionable if you're better or worse off in terms of correctness of application logic when you use it.
...you're probably better off using the borrow checker (that's why it exists) or an abstraction in a crate to deal with this sort of problem, regardless of whatever implementation strategy it uses internally (unsafe, this, etc).
[1] - https://www.youtube.com/watch?v=4t1K66dMhWk https://www.youtube.com/watch?v=4t1K66dMhWk