Image missing.
(On | No) Syntactic Support for Error Handling

created: June 3, 2025, 4:18 p.m. | updated: June 4, 2025, 6:55 a.m.

[ On | No ] syntactic support for error handlingRobert Griesemer3 June 2025One of the oldest and most persistent complaints about Go concerns the verbosity of error handling. (For a while, the lack of generics surpassed complaints about error handling, but now that Go supports generics, error handling is back on top.) To explore the impact of the try built-in, we wrote a simple tool (tryhard) that rewrites existing error handling code using try . The complaints about the verbosity of error handling persisted (see Go Developer Survey 2024 H1 Results), and so, after a series of increasingly refined Go team internal proposals, Ian Lance Taylor published “reduce error handling boilerplate using ? At that time, a better solution might have been to provide more syntactic support for error handling.

4 days, 22 hours ago: Hacker News