zig-lang and vlang have special handling and function markers for exceptions or 
errors, they are wrapped in an option type and there is some language support 
to make it concise. I think it's a nice innovation. The main idea is that 
exceptions are not some subtle invisible thing that bubbles up until maybe 
someone catches it. the compiler sees the errors and requires you to handle 
them, and make a decision where to handle them. Nim has the raises pragma, 
which has a lot of potential when we're talking about safe, maintainable, error 
free programming. It also reduces the programmer stress for critical code that 
just has to be bug-free. Basically reduces the possible ways that the program 
can fail or produce errors or bad data.

Reply via email to