News for hackers. Stuff that matters.
Re:Twelve Years of Go by boloust on Wednesday November 10, 2021 @07:45PM (#29183041)
Because when you're writing a reusable, self-contained function, you often don't know enough of the context to "handle" the error.

Let's say you've got a function that reads from a file. If the file doesn't exist, what do you do? That entirely depends on the context the function is called in. If it's in a web server, you might return a 404. If it's a background task polling for some data, you might sleep for a while until the file is uploaded. Or you might want to create the file yourself.

Re:Twelve Years of Go by jhgb on Wednesday November 10, 2021 @10:56PM (#29184277)
Common Lispers in the back are excitedly waving their hands and whispering: "Restarts! Restarts!"