logoalt Hacker News

ben-schaafyesterday at 1:13 PM1 replyview on HN

I can't find anything related to division returning an error type. Looking at std.math.divExact, rem, mod, add, sub, etc. it looks to me like you're expected to use these if you don't want to panic.


Replies

Turskaramayesterday at 1:41 PM

Actually you're right, I was going by the source code which was in the link of the comment you replied to, but I missed that that was specifically for divExact and not just primitive division.

show 1 reply