News for hackers. Stuff that matters.
Re:Why Go Can't Try by chis on Monday March 02, 2026 @01:37PM (#47222110)
These AI written articles carry all the features and appearance of a well reasoned, logical article. But if you actually pause to think through what they're saying the conclusions make no sense.

In this case no, it's not the case that go can't add a "try" keyword because its errors are unstructured and contain arbitrary strings. That's how Python works already. Go hasn't added try because they want to force errors to be handled explicitly and locally.

Re:Why Go Can't Try by win311fwg on Monday March 02, 2026 @01:51PM (#47222310)
It is simpler than that. Go hasn't added "try" because, much like generics for a long time, nobody has figured out how to do it sensibly yet. Every proposal, of which there have been many, have all had gaping holes. Some of the proposals have gotten as far as being implemented in a trying-it-out capacity, but even they fell down to scrutiny once people started trying to use it in the real world.

Once someone figures it out, they will come. The Go team has expressed wanting it.

Re:Why Go Can't Try by WalterGR on Monday March 02, 2026 @02:14PM (#47222641)
> nobody has figured out how to do it sensibly yet.

In general or specifically in Go?

Re:Why Go Can't Try by qezz on Monday March 02, 2026 @01:43PM (#47222207)
The mentioned in the article `try` syntax doesn't actually make things less explicit in terms of error handling. Zig has `try` and the error handling is still very much explicit. Rust has `?`, same story.
Re:Why Go Can't Try by jcmfernandes on Monday March 02, 2026 @01:54PM (#47222350)
I just read the article and I didn't get away with that rationale. Now, this isn't to say that I agree with the author. I don't see why go would *have* to add typed error sets to have a try keyword.

Yes, mimicking Zig's error handling mechanics in go is very much impossible at this point, but I don't see why we can't have a flavor of said mechanics.

Re:Why Go Can't Try by LovelyButterfly on Tuesday March 03, 2026 @12:16AM (#47228382)
What led you to believe this is an AI written article?