Hacker News new | ask | show | jobs
by adastra22 301 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.

2 comments

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.
Seems just as quick to make an enum with thiserror string conversion? Not much boilerplate at least.
You can also use eyre! with it's accompanying Result for even easier and faster development.
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.