Get the latest tech news

Zig's New Writer


Karl Seguin's Blog - A mix of coding and creative writing

It doesn't apply to Zig 0.14.x (or any previous version) and is likely to be outdated as more of the Io namespace is reworked. The simplest way to implement drain, and what a lot of the Zig standard library has been upgraded to while this larger overhaul takes place, is: We ignore the splat parameter, and just write the first value in data( data.len > 0 is guaranteed to be true).

Get the Android app

Or read this on Hacker News

Read more on:

Photo of zig

zig

Photo of New Writer

New Writer

Related news:

News photo

Zig's new I/O: function coloring is inevitable?

News photo

Zig's New Async I/O

News photo

Self-hosted x86 back end is now default in debug mode