Phobos 3 Discussion Notes - 02-01-2024

Sebastiaan Koppe mail at skoppe.eu
Sun Feb 4 21:10:20 UTC 2024


On Sunday, 4 February 2024 at 12:35:02 UTC, Jonathan M Davis 
wrote:
> On Sunday, February 4, 2024 3:13:39 AM MST ryuukk_ via 
> Digitalmars-d wrote:
>> EH is evil, some platforms has banned it completly (apple), 
>> and microsoft is all in rust, they are rewritting their C# 
>> application in Rust too, not just C++, it is an inferior design
>>
>> https://www.theregister.com/2024/01/31/microsoft_seeks_rust_developers/
>
> A number of us do not agree with you, and I for one never will. 
> For many situations, exceptions are by far the best error 
> handling mechanism that there is.

I personally find exceptions useful only when I want to jump many 
stack frames at once.

Overall I find them taxing because they add another possible 
'return' value to a function. Sometimes its documented, but 9 out 
of 10 times you'll find out at runtime.

Knowing all the possible error states of a function helps me 
enormously in avoiding surprises later on. While it might seem 
overwhelming at first, I find it liberating because the complete 
state space is right in front of me. I guess it is similar to the 
benefits of local reasoning.

Note I often write server programs. YMMV with e.g. batch programs.


More information about the Digitalmars-d mailing list