Remix.run Logo
adastra22 3 days ago

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.

bigstrat2003 3 days ago | parent | next [-]

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.

lawn 3 days ago | parent | next [-]

You can also use eyre! with it's accompanying Result for even easier and faster development.

adastra22 3 days ago | parent | prev [-]

Seems just as quick to make an enum with thiserror string conversion? Not much boilerplate at least.

db48x 3 days ago | parent | prev [-]

I’m an actual Rust programmer, and I’ve done that. Especially for the first iteration of something when I’m not yet sure what will be included, or when the errors are just going to be printed to the terminal as the program exits.