Skip to content

Conversation

@ferreira-tb
Copy link
Collaborator

@ferreira-tb ferreira-tb commented Dec 2, 2025

@ferreira-tb ferreira-tb added the bug Something isn't working label Dec 2, 2025
@ferreira-tb ferreira-tb self-assigned this Dec 2, 2025
@ferreira-tb ferreira-tb merged commit c17b573 into main Dec 2, 2025
@ferreira-tb ferreira-tb deleted the next branch December 2, 2025 14:32
@scottmcm
Copy link

scottmcm commented Dec 2, 2025

Hi @ferreira-tb! Author of rust-lang/rfcs#3721 here.

I'd love to hear any feedback you have after doing this. Looks like they were mostly homogeneous, but a couple where heterogeneous? How do you feel about the code in the new form?

Happy to hear from you here, in zulip (especially if you'd rather private message), in the RFC thread, wherever.

@ferreira-tb
Copy link
Collaborator Author

@scottmcm First, thank you for your amazing work. I use try blocks a lot, and the recent updates made me smile. I feel we're much closer to stabilizing them.

I think making them homogeneous by default was absolutely the right decision. It covers most cases and makes the code cleaner, loved it. This was the first project I updated like this, but I'll probably update others very soon.

In the few places where I needed heterogeneous blocks, I didn't care much about the exact Err variant, only that something went wrong. I first tried to keep the blocks by converting errors before using the ? operator, but it didn't feel right, so I ended up using workarounds (for example, moving the code to a new function).

So although I'm very happy with this new default, I agree it would be better to also have a way to force them to be heterogeneous (thanks for your work on that, btw). I'll experiment with them once they're ready and let you know if I encounter any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants