As someone who doesn’t write Zig, I wish the code examples gave type annotations for the writers so I could see the difference between the old generic API and the new `std.Io` interface.
bayesnet
As someone who doesn't write Zig (but is hoping to soon!), I'm struck when reading this that the new interface seems much more verbose than the old interface... i.e. 6 LoC vs the previous implementation's 3 LoC.
I was under the impression that verbosity was something that Zig tries to reduce, but perhaps this is not emblematic of other updates to the language?
sarreph
So many Claude-isms in one post. Please stop.
Jowsey
Needing to manually call flush seems like a major issue, is there a friendlier wrapper in the std lib to print and flush and use some static storage for the buffer? Since that seems like it would become step one of any zig project
Nail2680
This reads either AI generated, or written by someone who has gotten too used to AI writing. The structure is off and filled with "Here's what happened next" and "Why that matters" and "X happens, not Y" without context for why I'd care, or why I'd expect Y.
comments (5)
bayesnet
I was under the impression that verbosity was something that Zig tries to reduce, but perhaps this is not emblematic of other updates to the language?
sarreph
Jowsey
Nail2680
delusional