Earlier quoted context omitted.
LLMs love to do this. I assume they are trying to write JavaScript or Python or whatever, but in Rust. I have never seen an actual Rist programmer do this, and that was clue #1 that TFA was AI generated without review.
I do when prototyping. Long term you don't really want to pass around &str errors, but they are quick and dirty and easy to get rolling with.
Ergonomic errors in Rust: write fast, debug with ease, handle precisely
21–28 of 28 posts
Re: Ergonomic errors in Rust: write fast, debug with ease, handle precisely
#22Earlier quoted context omitted.
Compilation time turns into cognitive load via frustration. Death by a thousand cuts.
https://xkcd.com/303/ (compilation time is good for brain switch off time - i.e. reducing cognitive load).
Which is more or less what this XKCD encapsulates.
Re: Ergonomic errors in Rust: write fast, debug with ease, handle precisely
#23This just feels like recreating exceptions, but with more complicated syntax.
I mean broadly that's my entire problem with errors as values: every implementation wastes a ton of syntax trying to make them like exceptions.
Re: Ergonomic errors in Rust: write fast, debug with ease, handle precisely
#24Earlier quoted context omitted.
LLMs love to do this. I assume they are trying to write JavaScript or Python or whatever, but in Rust. I have never seen an actual Rist programmer do this, and that was clue #1 that TFA was AI generated without review.
I do when prototyping. Long term you don't really want to pass around &str errors, but they are quick and dirty and easy to get rolling with.
Re: Ergonomic errors in Rust: write fast, debug with ease, handle precisely
#25This just feels like recreating exceptions, but with more complicated syntax.
Re: Ergonomic errors in Rust: write fast, debug with ease, handle precisely
#26I have never seen anything use Result , that is such an anti-rust thing to start with.
LLMs love to do this. I assume they are trying to write JavaScript or Python or whatever, but in Rust. I have never seen an actual Rist programmer do this, and that was clue #1 that TFA was AI generated without review.
Re: Ergonomic errors in Rust: write fast, debug with ease, handle precisely
#27Rust used to be pretty hard to read and write, now with ai coding agent not anymore.
Have you had success doing non-trivial Rust with AI agents? In my experience they're all pretty bad at it once you get beyond the basics and start having tricky lifetimes and complicated types, but I'm interested to hear what people have done to make it better.
Re: Ergonomic errors in Rust: write fast, debug with ease, handle precisely
#28Three. Three distinct consumers. Get that in your head. When your application errors out on startup, it's the user who sees the error message. File system errors without seeing the path of the file are useless.