Neander language replaces exceptions with failable return types and three operators
Neander, a programming language, handles errors without try-catch blocks by having every API call return a failable type written as T!, which carries either a successful value or an error containing a code, message, and source function name. The language uses just three operators — =?, ??, and is — to narrow, substitute, or inspect failable values, mirroring the same syntax used for nullable types. Runtime errors like division by zero or out-of-bounds indexing are intentionally excluded from the failable type system to avoid making nearly every expression carry an error marker. When an error is not handled, it propagates upward through control flow via throwing until it exits the program entirely, rather than being caught. The design enforces a strict rule that failable values can only originate from external calls, keeping the error model predictable and structurally consistent.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in