Earlier quoted context omitted.
This really struck a chord with me. Writing documentation is an act of explaining something to others. Explaining something to others is a great way to test your own understanding. If it's hard to explain to someone else, then maybe it's the wrong design. If you don't through that exercise, you're much more likely to build confusing, difficult-to-use APIs.
> you're much more likely to build confusing, difficult-to-use APIs. have not found this to be the case with zig in general. you could easily make the opposite argument, that documenting things (especially quirks) can give you license to build confusing APIs.
I'm too dumb for Zig's new IO interface
171–180 of 329 posts
Re: I'm too dumb for Zig's new IO interface
#172Earlier quoted context omitted.
The key problem with Zig nowadays is how much of its community and adoption is driven by anti-Rust sentiment. As a result, while Rust puts beginner onboarding and documentation at the center of its culture, as opposed to the “C neckbeard”'s culture, Zig is going the other way around. (Loris Cro being a key community figure isn't helping in any way, and it's a good remainder that if you don't clear up your community f…
> The key problem with Zig nowadays is how much of its community and adoption is driven by anti-Rust sentiment. As a result, while Rust puts beginner onboarding and documentation at the center of its culture, as opposed to the “C neckbeard”'s culture, Zig is going the other way around. Maybe, or maybe the fact that Zig is a small independent project with limited resources has also something to do with it, and this ki…
Or, maybe it's this kind of redirection and evidence of a victim complex. Part of the reason that there's a patina of anti-Rust sentiment includes the dismissive attitude and swipes you, a the VP of Community at the Zig Software Foundation, take towards Rust and Rust developers by writing about topics you aren't involved in and don't have a solid grasp of.
https://kristoff.it/blog/raii-rust-linux/ https://lobste.rs/s/hxerht/raii_rust_linux_drama#c_gbn1q8
Or similarly, comments like this one in this thread: https://news.ycombinator.com/context?id=44994749
Re: I'm too dumb for Zig's new IO interface
#173Re: I'm too dumb for Zig's new IO interface
#174Earlier quoted context omitted.
It's not a false dichotomy, it's a bandwidth issue. I'd rather the core team focus on stuff like incremental compilation.
"No documentation" and "Core devs 'wasting' time on writing high quality documentation" aren't the only two options, that's what a false dichotomy means. Other options include but are not limited to providing minimal, low effort examples, high-level overview, linking to projects using these features, linking to relevant tests, commits, or source code, setting up an official community wiki and encouraging people to co…
Re: I'm too dumb for Zig's new IO interface
#175Earlier quoted context omitted.
> Why would you care about these kinds of micro-optimizations it turns out that compiler speed is bound by a bunch of things, and it's death by a thousand cuts. If you have a slow compiler, and it takes forever to compile your compiler, your language becomes scelerotic, no one wants to make changes, and your language gets stuck in shitty choices. > Because a compiler is not some simple CLI tool with a fixed upper bou…
You're losing sight of the full picture: This "optimization" was such a hindrance that they had to rewrite the compiler before they could work on the ecosystem of their new language. From kristoff_it's comment [1]: > When I first joined the Zig project, Zig was still using the bootstrap compiler written in C++ that would not free memory (it took more than 4GB to compile the Zig compiler). Some people at the time were…
I think you may have missed that the intention was always to rewrite the compiler to become self hosted. Improving the C++ implementation any more would've been pointless optimization.
Re: I'm too dumb for Zig's new IO interface
#176Re: I'm too dumb for Zig's new IO interface
#177Earlier quoted context omitted.
> The key problem with Zig nowadays is how much of its community and adoption is driven by anti-Rust sentiment. As a result, while Rust puts beginner onboarding and documentation at the center of its culture, as opposed to the “C neckbeard”'s culture, Zig is going the other way around. Maybe, or maybe the fact that Zig is a small independent project with limited resources has also something to do with it, and this ki…
> Maybe, or maybe the fact that Zig is a small independent project with limited resources has also something to do with it Or, maybe it's this kind of redirection and evidence of a victim complex. Part of the reason that there's a patina of anti-Rust sentiment includes the dismissive attitude and swipes you, a the VP of Community at the Zig Software Foundation, take towards Rust and Rust developers by writing about t…
Re: I'm too dumb for Zig's new IO interface
#178This pattern (new language evolves to be as complex as the languages it was supposed to replace) seems familiar.
Re: I'm too dumb for Zig's new IO interface
#179> To convert the Stream.Reader to an std.Io.Reader, we need to call its interface() method. To get a std.io.Writer from an Stream.Writer, we need the address of its &interface field. This doesn't seem particularly consistent. That made me think of how that change would be received in Go (probably would be discarded). They way they approach changes in extremely deep analysis and taking as much time as it needs to avoi…
Rust is the same. It grinds my goat a little how many useful features are implemented - but only available in nightly rust. Things like generators. But when rust ships features to stable, they’re usually pretty well thought through. I’m impatient. But the rust language & compiler teams probably have the right idea.
Re: I'm too dumb for Zig's new IO interface
#180Earlier quoted context omitted.
I love Zig precisely because it is so similar to C. Honestly, if you don't like C, I can totally understand why you wouldn't like Zig. But I love C, and I love Zig. Zig has become my go-to for projects where I would previously have reached for C, largely because Zig has such good compatibility with other C projects. Rust, on the other hand, is a completely different beast. It is very different from C, and it is far m…
C is entirely as complicated as Rust, if your goal is to write correct software that doesn't crash all the time. It's only a syntactically simple language. Actually making anything interesting with it is _not_ simple.