News for hackers. Stuff that matters.
Re:Expectations for generics in Go 1.18 by rustnote on Thursday October 28, 2021 @12:02AM (#29022229)
I like what Chris Lattner said about language design in Lex Fridman podcast, that you know when you're doing something right because it "feels" right. Rust has a bunch of syntactic sugar which gets critised in many languages, but to me things like error returns with ? "feels" right. Love Go as well, and the error handling makes a lot of sense in concept but it just doesn't "feel" nice to look at or use.

I like there's a language that has such a strong vision, but dealing in absolutes has drawbacks, a little sytactic sugar would make error handling a lot nicer.

Re:Expectations for generics in Go 1.18 by jatone on Thursday October 28, 2021 @03:59AM (#29023538)
eh having used both, rust's approach isn't any better. when you need to decorate an error, which generally is a lot of the time, rust has the same ergonomics as golang. they optimized code for a generally rare situation.

I do appreciate rusts match syntax though.

Re:Expectations for generics in Go 1.18 by fourseventy on Thursday October 28, 2021 @01:19AM (#29022642)
For what it's worth I really like how go handles errors.
Re:Expectations for generics in Go 1.18 by shakezula on Thursday October 28, 2021 @02:44AM (#29023119)
I’m with you in this one, Go’s error handling was intuitive to me. It was my first compiled and typed language, though. That might bias my experience.
Re:Expectations for generics in Go 1.18 by otabdeveloper4 on Thursday October 28, 2021 @11:37AM (#29027349)
> that you know when you're doing something right because it "feels" right

Absolutely false. When you write the really groundbreaking and important software "feels right" is absolutely not what you should be experiencing.

The correct mode you should be in is "holy fuck how did I get here, and can I come out in one piece"?

(A: no, you can't, but the new you will be a better you.)