News for hackers. Stuff that matters.
Re:Error Handling in Zig by hgs3 on Sunday August 06, 2023 @12:49PM (#37023888)
Perhaps a controversial opinion, but I think exceptions should only be thrown when something exceptional happens. Languages, like Java and Python, overuse them e.g. failing to open a file is not exceptional, but running out of memory is.
Re:Error Handling in Zig by pjmlp on Sunday August 06, 2023 @01:23PM (#37024366)
Running out of memory is an Error, not Exception, in Java's case, and the throw semantics are different.