Y
Hacker News
new
|
ask
|
show
|
jobs
by
AnIdiotOnTheNet
2877 days ago
Zig defines checked versions of mathematical operators in its std lib [0], which return an Error Union. It's like an Optional (which Zig also has), but with an error instead of null. Your code can choose to handle this error however it wants.
[0]
https://ziglang.org/documentation/master/#Standard-Library-M...