Hacker News new | ask | show | jobs
by tialaramex 347 days ago
> Andrew’s design decisions in the language have always been impeccable. I’ve never seen him put a foot wrong and would have made the same change myself.

Interesting, who designed the old Zig IO stack which alas Andrew needed to replace?

5 comments

Actually, nobody.

Here is the commit where Reader/Writer was introduced: https://github.com/ziglang/zig/commit/5e212db29cf9e2c06aba36...

This is a few months after `git init`. You can see I was really just working on the parser, with a toy example to get things started.

Over time, I merged contributions that made minor changes and shuffled things around, and these APIs evolved to kind of work okay. But nobody really considered "the Zig IO stack" as a whole and put in design effort. That is happening for the first time right now.

This is how programming languages are constructed. Things evolve slowly over time, and periodically you have to reevaluate things and do major reworkings.

Actually, I wasn’t intentionally designing anything.
I've built a bridge 20 years ago. It was great, people could finally go from one side of the river to the other.

Everyday, more and more people started using that bridge.

In 2025, I've rebuilt the bridge twice as big to accommodate the demand of a growing community.

It's great and the people love it!

But some people are upset because you put the new bridge in a new location and now it's inconvenient for them?
Nah, they are upset because it brought more people, which increased the traffic...

https://www.wired.com/2014/06/wuwt-traffic-induced-demand/

Indeed, but to be fair, the old stack was done with a hand, not a foot!
A less experienced Andrew
I think what you're not appreciating is how this design is a huge improvement over the status quo, not only in Zig, but also the streaming interfaces in most languages.

Wait till the SD25 talk on this comes out, to first understand the rationale a bit better!

> I think what you're not appreciating is how this design is a huge improvement

The point was that if he did the old design, which needed improving enough to justify breaking the language backwards compatibility, then why say his decisions are impeccable? Pobody's nerfect.

Yes, and my point (in response) was that Zig's status quo was no different from other languages, but now is better. (There's some humor in the issue's title “Writergate” here!)

Again, we use Zig, and this change is welcome for us.

We also like that Zig is able to break backwards compatibility, and are fully signed up for that.

The crucial thing for TigerBeetle is that Zig as language will make the right calls looking to the next few decades, rather than ossify for fear of people who don't use it.

> Zig's status quo was no different from other languages

No-one's claiming that the people who wrote the other languages never put a foot wrong, so there's no claim of perfection to knock down with them.

I can't wait for the SD25 videos!
Thanks, same! :)