▲ | quotemstr 4 days ago | |||||||||||||||||||||||||||||||||||||
And we slowly circle back to what Rust should have done all along: exceptions with Java/Python-style causal chaining. I wonder how loudly "the community" would scream at me if I published something that just used panics for all error reporting. | ||||||||||||||||||||||||||||||||||||||
▲ | dwattttt 4 days ago | parent | next [-] | |||||||||||||||||||||||||||||||||||||
I've been following Raymond Chen's recent series on writing a tracking C++ pointer class with interest. Most of the articles start with "to fix the mistake we showed at the end of the last article", and end with "but now we've broken something else". Needing to keep track of where exceptions can occur, so that you don't leave an operation half committed, sounds especially nasty: https://devblogs.microsoft.com/oldnewthing/20250827-00/?p=11... | ||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||
▲ | ninkendo 4 days ago | parent | prev [-] | |||||||||||||||||||||||||||||||||||||
Except the java/python style with unchecked exceptions means an exception can happen at any time, there's no way to know in advance. This is what Rust is trying to avoid with the errors-as-values approach. It has its drawbacks, yes, but I'd never go back to the wild-west YOLO approach of unchecked exceptions, personally. | ||||||||||||||||||||||||||||||||||||||
|