News for hackers. Stuff that matters.
Re:Borgo is a statically typed language that compiles to Go by Capricorn2481 on Wednesday May 01, 2024 @05:30PM (#40229752)
That has nothing to do with having exceptions, Rust just has a good type system (something go doesn't have).

But again, handling an error doesn't necessarily prevent bugs. Just because you handled an error doesn't mean the error won't happen in Prod. It just means when it does, you wrote a message for it or custom behavior. Which could be good, or it might be functionally as effective as returning a stack traces message. It depends on the situation.

For what it's worth, I've never seen people not handle errors that the user could do anything with. If it's relevant to the user, we handle it.

Re:Borgo is a statically typed language that compiles to Go by IshKebab on Thursday May 02, 2024 @02:45AM (#40233380)
> That has nothing to do with having exceptions

It absolutely does. Checked exceptions sort of half get there too but they are quite rarely used (I think they are used in Android quite well). They were actually removed from C++ because literally nobody used them.

> handling an error doesn't necessarily prevent bugs.

I never made that claim.

> I've never seen people not handle errors that the user could do anything with.

We already talked about "something went wrong" messages. Surely you have seen one of those?

Re:Borgo is a statically typed language that compiles to Go by Capricorn2481 on Thursday May 02, 2024 @11:40AM (#40237496)
> We already talked about "something went wrong" messages. Surely you have seen one of those?

My point is that "something went wrong" messages are for errors the user CANT and SHOULDNT do anything with.