News for hackers. Stuff that matters.
Re:Go Replaces Interface{} with 'Any' by TheDong on Tuesday December 14, 2021 @10:22PM (#29561693)
The comparison here is with go.

Unwrap would look like:

    file := os.Open("foo").Unwrap()
I'll take that over the current go state of the art:

    file, err := os.Open("foo")
    if err != nil {
        panic(err)
    }
Just like "panic(err)" is used infrequently, "unwrap" would be used infrequently. They're comparable, and for the cases where unwrap is okay (test code, once-off scripts, etc), I'd definitely prefer it to the panic boilerplate.
Re:Go Replaces Interface{} with 'Any' by tptacek on Tuesday December 14, 2021 @11:08PM (#29561977)
I don't understand this example at all. A Rust programmer would essentially never use unwrap on the return from File::open. It would be like checking open(2) with assert() in C.
Re:Go Replaces Interface{} with 'Any' by preseinger on Wednesday December 15, 2021 @02:43AM (#29563120)
That Go would never pass code review unless it is part of a tiny CLI tool or script.