News for hackers. Stuff that matters.
Re:1/0 = 0 (2018) by eru on Monday December 02, 2024 @11:50PM (#42303154)
It depends on your use case.
Re:1/0 = 0 (2018) by throwawaymaths on Tuesday December 03, 2024 @10:27PM (#42314248)
Sure but what should be the default?
Re:1/0 = 0 (2018) by eru on Wednesday December 04, 2024 @02:00AM (#42315073)
Rust and Haskell can solve this fairly well: both styles of dealing with errors are easily accessible.

Go solves this really badly.

As for specifically what to do about division: the right default depends on your application. Either way is defensible, and I would rather work on making it easy to pick either style in the language of your choice, than to worry too much about what the default should be.