Hacker News new | ask | show | jobs
by lolinder 15 days ago
The very next sentence justifies why they didn't do it: it argues that they would have ended up with what was technically Zig but something that was much less ergonomic than what would be expected from Zig.

You can argue that that's a bad justification for not doing it, but that's a debate on the technical merits, not a claim that they didn't provide justification.

2 comments

Yeah since my whole point is about the technical merits of the rewrite article, I don't count that as justification.

Why is just a wrapper type "less ergonomic"? Everybody does that all the time in every language. And then if you can convince me it is less "ergonomic": why does it matter if it solves the problem? And that is considering humans write the code manually. Why does it matter if agents write the code? This makes no sense.

The example shows three extra lines of code, two of which are `defer`s. I'm not an expert in Zig and can't tell you whether the example they give is contrived, but the claim they're making is way more than "a wrapper type".

> And that is considering humans write the code manually. Why does it matter if agents write the code? This makes no sense.

Because the particular form of non-ergonomic code that is demonstrated here amounts to a quadrupling of tokens. That's a substantial hit to the context window for safety that isn't even statically enforced.

A wrapper class if you want, a wrapper type with methods / dedicated functions. Still, seems pretty ergonomic to me. Yeah we went from one line to three, but the three lines guarantee safety whereas the one doesn't so?

Also I'm not sure the token count is very relevant for an Anthropic employee who just spent 165k worth of token rewriting the whole thing in Rust. Sprinkling a few defers here and there and swapping types surely would have been immensely cheaper in tokens.

You're failing to distinguish between token count spent and context window used.

You're correct that the former is not a concern for Anthropic, but it's also not the problem I'm pointing out.

The actual is not token count, it's context window. Your context window is finite, and every token you add to it reduces the model's accuracy during inference.

As the article mentions, the follow on question from that is: why does that matter if your codebase is written exclusively by AI agents?
Because if you have to quadruple the number of tokens in your code base in order to make the Zig provably safe, you have 1/4 of the context window to do useful work.
So why not say that? Perhaps because it highlights a flaw in AI agent workflows?
Because what they did say is true for both agents and humans. Which makes it a more compelling argument than just emphasizing the specific aspect of that limitation agentic workflows.

In one comment you are presuming that agents can just ignore ergonomic problems, which would be a kind of magic if it were true, and in the next you are saying that their inability to digest enormous quantities of unnecessary tokens is some kind of flaw that needs to be called out.

Enormous quantities of unnecessary tokens are bad ergonomics for anyone, agent or otherwise.