7 ms·
Sounds like a Zig-shaped hole to me ;-)
by Sophistifunk 1y ago
Sounds like a Zig-shaped hole to me ;-)
- Expurple 1y agoThey complain that Go is too low-level for their needs. Zig, with its explicit allocators, is definitely even lower-level. Rust seems low-level too, but it isn't the same. It allows building powerful high-level interfaces that hide the complexity from you. E.g., RAII eliminates the need for explicit `defer` that can be forgotten
- Sophistifunk 1y agoTrue, but I think the "low-level" complaint against Go in the article was just referring to all the stupid repetitive ceremony required for error handling, which Zig mostly skips over.
- Expurple 1y agoFair enough. That's what they seem to be saying. But then I want to chime in and argue that the repetitive syntax isn't even close to being the main problem with Go: https://home.expurple.me/posts/go-did-not-get-error-handling-right/ https://home.expurple.me/posts/go-did-not-get-error-handling...
- sgt 1y agoSo, while on that subject; does Zig get error handling right?
- Expurple 1y agoIdk, I'm not familiar enough with Zig to say
- lblume 1y agoIt does seem to: https://pedropark99.github.io/zig-book/Chapters/09-error-handling.html https://pedropark99.github.io/zig-book/Chapters/09-error-han... However errors do not seem to commonly wrapped, tagged or contextualized as is the case in Rust. This might weight lower verbosity as more important than extremely structured error handling which definitely constitutes an interesting approach.
- osigurdson 1y agoI think it does.