News for hackers. Stuff that matters.
Re:Brad Fitzpatrick on the future of Go by steveklabnik on Wednesday October 15, 2014 @11:04AM (#8458774)
Why do you say Rust has exceptions? We have fail!(), which does roughly the same thing as Go's panic(). So much so that we decided to rename it to panic!().
Re:Brad Fitzpatrick on the future of Go by kyllo on Thursday October 16, 2014 @12:28AM (#8463363)
You're right. I must have misunderstood something I read.
Re:Brad Fitzpatrick on the future of Go by steveklabnik on Thursday October 16, 2014 @08:30AM (#8464531)
Cool :)
Re:Brad Fitzpatrick on the future of Go by kyllo on Thursday October 16, 2014 @09:01AM (#8464641)
Ahh, I remember what it was. I saw a code snippet like this:

    let input = reader.read_line().ok().expect("Failed to read line");
And I thought "Cool, Rust has exceptions!"

I'm probably too used to thinking in Python. Or maybe I'm just dyslexic and I read "expect()" as "except()".

Either way, your comment prompted me to dig into it further and find out how Rust actually handles errors. So, thanks!

Re:Brad Fitzpatrick on the future of Go by steveklabnik on Friday October 17, 2014 @08:29AM (#8470581)
Thanks for elaborating! I wrote that line in the docs, actually. I wonder if I should add an explicit note about exceptions not being a thing.