3 ms·
Your suggestions require a continuation to handle the "else" part of the branch. In C# that would look significantly worse than the Try* pattern.
by Sacho 10y ago
Your suggestions require a continuation to handle the "else" part of the branch. In C# that would look significantly worse than the Try* pattern.
- gnaritas 10y agoThat's a matter of opinion, nothing looks worse to me than those out parameters and there's always a way to do things in a cleaner more expressive way than that ugliness. I find many Smalltalk idioms look and work just fine in C# and greatly reduce the amount of code I need to write. C# still lacks quite a lot in comparison to Smalltalk, but it's slowly getting there year by year.