Comment by randomdata

Comment by randomdata 9 days ago

0 replies

> I don't know what the syntax should look like.

I'm not sure the syntax is all that significant. There have been numerous proposals, but the syntax was never the reason for rejection. It is that the entire concept is unusable in the state that it is understood.

That's not to say the problems can't be solved, but nobody has yet.

> It's very common to have a chain of these kinds of calls making up the body of a function.

Yes, like in Rust, for example. But it also has defined traits and other features on top of the chaining to deal with the same problems Go would suffer from it had such syntax. Theoretically Go could introduce the same, but it remains unclear how to do that in a way that makes sense in the Go language.

Again, there is probably a solution out there, but nobody has come up with it yet. Surprisingly, these kind of things aren't sent down from the heavens by a magical deity. It takes human effort, which isn't there because they are busy ranting on HN.

> It seems like "return err" is very useful for this pattern

Where would you find it useful (memes aside)?