Hacker News new | past | comments | ask | show | jobs | submit
Returning Result/Options that the compiler forces you to check so you can't forget.

Common in ML-family languages and Rust. They've been brought into most mainstream languages like Java by now because of how useful they are.

loading story #50511328
Odin has @(require_results) that forces you to do something with returned values (e.g. T, Maybe(T), (T, bool))

Where Maybe is a polymorphic union of T and nil but the core library returns either (T, bool) or (T, E) where E is an error enum.