Settings

Theme

Is library building obsoleted by AI coding?

3 points by k1w1 · 5 comments · 1 min read


Huge open source projects have been successful by building upon dozens to hundreds of small libraries that encapsulate functionality and complexity.

AI coding uses these libraries to quickly build applications.

With the latest round of model releases I am seeing that AI can now generate the functionality of almost any library in-line as it generates the application.

When building took a long time, breaking things down into well defined modules, shipping incrementally, and reusing code, were essential techniques. They seem much less important when AI is doing the work.

Is software library creation obsolete?

4 threads
the_hoser

In theory, sure. If you can churn out code that does it without libraries, what's the point of the library, right?

In practice, no, at least probably not. It's all about scope and context. Those libraries spent years fixing bugs and solving for corner cases. Even with AI, when you decide to implement those things yourself, you and your AI agents get to re-make the mistakes the library authors made. You assume the responsibility for long-solved problems.

AI can make the kind of software development you are imagining more possible, but still wildly impractical.

  • k1w1OP

    The big question is where the libraries of the future will come from. If AI building just creates all of the new code in one place, rather than take the time to extract and document reusable parts, then will we lose the open source environment that makes highly complex software possible today?

eventhelix

I use Claude Code with Rust. I have noticed a tendency to write custom code instead of using an existing crate.

One reason might be that the model's knowledge cutoff means it doesn't know about recent changes. One way to address this is to first ask the model to search the internet and find suitable crates/libraries before it decides to write new code.

slaymaker1907

I’ve wondered the same, but with programming languages. However, there are a couple of reasons why I think programming languages and libraries will be important.

Most importantly, imagine a timeline where no one has invented any programming language beyond assembly. I think an LLM would have difficulties implementing complex programs in assembly without a bunch of supporting libraries.

Sure, the LLM might be able to make the libraries eventually (will it actually know them all without ANY domain knowledge from a human?) but it would take a lot of time and money to do that. And really, you’re still creating libraries, the only question is if you share them or not.

Another thing is that human written code can be much better than what the AI would write. For example, saw it basically duplicate the same complex operation three slightly different ways instead of just abstracting that away in a function.

uberman

Would you rather ai leverage postgres or reimplment it to support persistence for your project?

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection