← Back to context

Comment by joshheitzman

5 hours ago

The Rust ecosystem isn't structured for the high friction dependency model the C has. Its structured around nearly frictionless dependencies so its no surprise that dependency trees are very large and frequently changing.

The typical C project has far fewer dependencies than the typical Rust project. Those dependencies are usually individually larger and either maintained by OS maintainers or there is a copy of the code that is built for the project and is readily available for audit. Those copies can't change without direct action.

Its less trouble to setup static analysis, address sanitizer, and similar tools for a C project than it would be to manage local copies of thousands of dependencies for a Rust project.

There's nothing stopping you from ignoring the ecosystem and just using Rust with the stdlib. Remember that the context for this thread is AI-generated code. If the AI is writing it all, the code is effectively free, you can write tens of thousands of lines of it with a single prompt, you can customize it all to your specific use-case, and you can throw it away and have the AI write it again instead of maintaining it. Also as manual programmers we're accustomed to programming being a team sport where you fit in gracefully into the ecosystem and build things with the maintainer and rest of the team in mind, but in the AI world, you can ignore the ecosystem, there is no maintainer (because you throw it away and have the AI write something else when the requirements change), and the rest of the team has all been laid off.

There's a bunch of threads going on simultaneously on HN now about how people often misuse AI by applying rules of thumb learned from doing things as a professional to what they prompt the AI to do, rather than just asking it directly for what you want. This is one of those cases. Many of the rules of thumb of professional programming no longer hold under the radically different economics of AI-driven development.

  • > If the AI is writing it all, the code is effectively free

    Its not even close to free in either $, your own personal time, or calendar time.

> Its less trouble to setup static analysis, address sanitizer, and similar tools for a C project than it would be to manage local copies of thousands of dependencies for a Rust project.

It is trivial with Rust to set up asan and friends. You just

  $ RUSTFLAGS=-Zsanitizer=address cargo build -Zbuild-std --target x86_64-unknown-linux-gnu

And you’re off to the races.

This works for your dependencies too. This isn’t C, you don’t need to manage all of those builds individually. That’s what the build system is for.