News for hackers. Stuff that matters.
Re:Announcing Rust 1.14 by sidlls on Thursday December 22, 2016 @06:17PM (#13241319)
It does turn into if-then statements (some implicit, e.g. via try! or ?), if done properly. But I don't understand the objection or calling it "devolving". Errors have to be handled. This way is as efficient as any other. And, in my view, is cleaner than exception handling systems.
Re:Announcing Rust 1.14 by barrkel on Thursday December 22, 2016 @07:10PM (#13241684)
Errors have to be handled

This is a highly contentious assertion, and I don't think it's true for most programs, at least not in the way you're suggesting.

Most of the point of exceptions is that errors don't have to be handled; or rather, in most application software, almost all errors should be handled high up in the stack, near the event loop or server request / response dispatcher.

Re:Announcing Rust 1.14 by int_19h on Thursday December 22, 2016 @08:19PM (#13242032)
There are errors, and there are errors.

The kind of error that you'd handle high up the stack is, say, a general I/O error reading a file.

But when you look up an item in a collection (or a node in a DOM tree), and it is not found, the only place where you can sensibly handle that is right where the lookup happens, usually.

In a language that doesn't follow this philosophy, what you get instead are random NullPointerExceptions etc. If you go and look at a random C# or Java project on GitHub and check its tracker, you will see that - surprise, surprise! - that is exactly the type of error that shows up most.

Re:Announcing Rust 1.14 by barrkel on Friday December 23, 2016 @09:28AM (#13244847)
Null pointer exceptions are programming errors. They're usually better handled up the stack too.

An item not found in a collection or tree is not an error.

Re:Announcing Rust 1.14 by int_19h on Saturday December 24, 2016 @12:06AM (#13248668)
How exactly do you handle a null pointer exception?
Re:Announcing Rust 1.14 by barrkel on Sunday December 25, 2016 @01:22PM (#13254923)
Programming errors in production are usually handled by logging and then either exiting the process or going back around the request / response loop again (presuming global state hasn't been polluted, which is unusual in most modern application servers since they're usually stateless).

Null pointer exceptions are little different.

Re:Announcing Rust 1.14 by staticassertion on Thursday December 22, 2016 @07:30PM (#13241789)
This is the same in rust. Panics end at thread boundaries. So you'd have some event loop with threads / coroutines doing stuff and if they panic you handle it at the top level.