4 ms·
Bad programmers write bad code in general, so basing your opinion of C#'s error handling system on their use of it seems unwarranted. Exception handling does no
by WorldWideWayne 11y ago
Bad programmers write bad code in general, so basing your opinion of C#'s error handling system on their use of it seems unwarranted. Exception handling does not remain a mystery to many programmers, just many bad programmers. Aside from that, the author is a contributor to Rust so I suspect there could be some small amount of bias here.
> ...catching errors/exceptions where they can be fixed is difficult...
What's difficult? When your program is about to do something like say open a file - if you don't want an exception to be raised from that code, you wrap that code in a try...catch. In the catch block, you take corrective action.
The very simple bottom line with error handling in .NET apps is that you handle/log/notify the user at process and thread entry-points like main and AppDomain.UnhandledException. Other than that, you use a try...catch block.
- vitalyd 11y agoError handling is one of the harder aspects of software engineering, IMHO. For starters, those code paths are less tested than others. See this, for example: https://www.usenix.org/system/files/conference/osdi14/osdi14-paper-yuan.pdf https://www.usenix.org/system/files/conference/osdi14/osdi14...
- kibwen 11y agoIt's a bit of a reach to sling accusations of bias. The Rust project makes it trivial for people to contribute, so anyone with even a passing interest in the language can become a "contributor to Rust" in seconds. If you try and disqualify all of the 1,000+ Rust contributors from writing blog posts about the language, then you most likely also disqualify everyone qualified to write about the language from writing about the language. :P
- WorldWideWayne 11y agoI didn't sling an accusation, I said "I suspect there could be some small amount of bias". If I were accusing, I would have said "this person is biased.". Despite what you say, I still think the suspicion is valid.
- kibwen 11y agoThat's fair, although I suspect that your suspicion of bias may be biased due to your usage of C#. :)
- WorldWideWayne 11y agoThe irony here is that people on HN do judge you if you live mostly in the C#/.NET world, but you're arguing against my suspicion of people who contribute to Mozilla. Do you think it's a far stretch to say that people who actively use open source languages and libraries and contribute to Mozilla projects are much more likely to be biased against anything that Microsoft does?
- kibwen 11y agoYou're still leaping to conclusions, you're just trying to justify it behind a veneer of persecution. I'm a Rust contributor and I think C# is a fantastic language; it's my dream to tempt Anders Hejlsberg away to Rust. :P I'm also typing this from a Windows 7 netbook, my sole computer, though I'm looking to upgrade to a Surface once Windows 10 is here. We have several former Microsoft employees in our ranks and one of our core contributors is currently interning at Microsoft. It is possible to be critical without there being a hidden agenda!
- WorldWideWayne 11y agoIt is possible, just not probable. You're an outlier.