5 ms·
So it can rust now? That's impressive! Last time I tried it had no way of valid rust code beyond hello-world level, constantly producing code that failed the b
by powerhugs 2y ago
So it can rust now? That's impressive!
Last time I tried it had no way of valid rust code beyond hello-world level, constantly producing code that failed the borrow checker.
- lionkor 2y agoI rarely if ever have to worry about the borrow checker, mostly stumbling blocks are move/copy/clone semantics. GitHub Copilot does a good job of generating correct Rust, it just has the usual subtle-but-annihilating-if-not-caught logic bugs, like in all other languages.
- diggan 2y ago> rarely if ever have to worry about the borrow checker mostly stumbling blocks are move/copy/clone semantics I'm don't write Rust for a living, only been experimenting on-and-off with the language, but isn't stumbling on the move/copy/clone semantics literally stumbling on the borrow checker? Or are there issues regarding move/copy/clone that aren't related to the the borrow checker?
- lionkor 2y agoThe borrow checker handles references, the fact that everything is move-by-default when it's usually copy-by-defaut (C, C++) or reference-by-default (Java, C#), that's not really a borrow checker feature. Move and copy semantics exist in C++, too, but the defaults are different.
- ajayka 2y agoIn my experience, Copilot is not able to fix rust code flagged by the borrow checker. Its suggestions are almost always wrong.This is a hard problem and often requires restructing the code (and sometimes using inner mutuability constructs such as RefCell and so on).