3 ms·
The new I/O interface makes printing a simple “Hello, world!” more complicated, but once you get used to it, the design is actually very clean, versatile, and f
by jedisct1 1y ago
The new I/O interface makes printing a simple “Hello, world!” more complicated, but once you get used to it, the design is actually very clean, versatile, and future-proof.
Since 0.15, though, I feel too dumb for Zig’s ArrayList.
- simonask 1y agoIs it future-proof though? Last I saw, it relied on some yet-to-be-determined design for compiling async variants of everything that uses IO, and it was still unclear whether it was possible at all to support dynamic dispatch. My info could be outdated - I don't follow Zig very closely, but I am curious.
- kristoff_it 1y agoThe Reader/Writer changes are perfectly compatible with the upcoming async I/O stuff and you won't need to change any code that just deals with streams. No promises about potential future changes though :^)
- throwawaymaths 1y agoi think hello world is actually easier? getstdout doesnt exist anymore and its equivalent is nonfailable.