Enums, Option and Result & error handling

It isn’t really a question, but “help” still looks like the best category.

I am learning Rust for myself, and I write a blog about it hoping to inspire at least some people in my line of work to try to learn to do more with their computer than excel and word. But to be honest, it is a bit lonely road for me, and talking with ChatGPT only goes so far. It responds with enthousiasm if asked, but still, that is different. So I am very happy that I can ask questions here, and I hope you also understand that I like to share some of my victories every now and then :slight_smile:

I asked a little time ago about Enums, and I was really wrestling until yesterday when I came to the part in the book about error-handling. Panics and aborts, that was easy. I wrestled again with Result, didn’t really get the unwrap() and expect(), let alone the ? operator.

But then I asked ChatGPT for help, tried to write some code myself, and the “penny dropped”. Not only do I understand this part about error-handling, but I finally feel like I really understand Enums now.

So, happy times :slight_smile:

So, what's your question?

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.