Hacker News new | ask | show | jobs
by deepsun 31 days ago
IMO the largest true value of the frameworks (and languages to some extent) is how they help long-running projects with many people coming and going. The most valuable trait was not what framework allowed, but what framework disallowed, preventing foot guns. E.g. Java got popular because it forced everyone to code similarly, at least more similar than other languages at that time.

But for agents it doesn't matter, so why frameworks at all?

PS: authors comparison is not relevant, as it's simple mostly-static app with very little cross-dependencies, localizations, component re-usage.

2 comments

Doesn't the same argument and reasoning apply to agents? What exactly about agents makes the conventions and standardization of frameworks less useful?
Javascript is notorious for not having a standardized way to do things. It doesn’t have a strong opinion on anything really. So I buy the argument that frameworks displace or even increase ways to do things. React patterns, SPA, nextjs, its all just too much.

Point is frameworks or not, Agents make a mess in javascript, so maybe it’s actually an improvement to establish the standard lib as the foundation and steer Agents from there. Adding frameworks expliodes the surface are of options.

Python is worse about this proliferation, despite the advice of its built-in koan (see: `import this`).

Sure with JavaScript's library a-la-carte fashion there's a proliferation of idioms far beyond eg Ruby's hegemonic "convention over configuration", but nevertheless React is still more of a lingua franca than Flask/FastAPI/SQLAlchemy ever was or will be. The most popular Python libraries do a thing and otherwise proscribe nothing.

JavaScript idioms pare down the universe of possibilities in a way that some programmers find claustrophobic, and Python is the wild west!

I know it's popular to characterize JavaScript as the wild west, but in that case it's a proliferation of abstractions, whereas with python, it's a proliferation of implementations, ie primitive obsession.

But I'm really putting far too fine a point on these differences. In the grand scheme of things, they are nigh indistinguishable scripting languages.

I'm dating myself a bit here, but I'm reminded of Douglas Crockford's book, JavaScript: The Good Parts. The idea being that under all of the cruft and foot-guns, JavaScript actually had all the elements of a good language. You just had to be disciplined about using only a subset of the language.

Isn't that essentially what we get with frameworks? I'm still unconvinced that frameworks are a problem with agents. If anything, pointing an agent at a single framework reduces its API surface, compared with the standard lib and every permutation of possible solutions that comes with it.

The combination of ES5 (and successors), Typescript, and community consensus resulted in everybody using “the good parts” without even having to think about it. Frameworks, in proportion, didn’t have to do much
I do agree, it’s just likely really hard in practice to keep agents disciplined. The most popular frameworks are quite substantial. For example my experience with agentic react development was both amazing - in that the sheer volume of drop-in interfaces allows you to create stunning interfaces previously reserved for startup darling design teams - and nerve wracking because the way agents integrate everything is just layers upon layers of hooks. hooks provide intentional loosely coupled plugin interfaces, but it’s not sane at all to take these to the extreme with literally 8 layers of state. im convinced it’s unsustainable and ridiculous. These AI apps are basically un-designed internally. Can’t understand how they’re maintained.
Jeez, does knowing JavaScript: The Good Parts make one dated now? guess i'm old too :(
In a couple of years the publication of that book will be closer to the invention of the web than the today.
The element of a good language is that it doesn’t have the foot guns. If I shit on your birthday cake, you don’t eat it because a reknowned baker wrote that, “underneath the feces, it had all the elements of a good cake”.
It doesn't apply to agents because people coming and going brought their own preferences, dislikes and ignorances. Also unspoken/unwritten rules and ideas for future structure. Agents follow the same AGENTS.md, know all the tricks other agents know, so I would expect them to code more uniformly.
I would encourage you to re-evaluate that expectation. A framework comes with strict, mechanical constraints for both developers and agents, while the contents of AGENTS.md can be ignored by agents. Even skills don't always get invoked, and you sometimes have to browbeat your agent to follow a skill or doc. But a framework provides a hard, mechanical guardrail with loud failures and known solutions. Combined with linting, strict types, and a language server, your LLM isn't going to be tempted to invent baffling solutions when a framework provides patterns for long-solved domains.

I would go so far as to argue that all of the reasons that frameworks are useful for human-led projects are equally, if not more applicable to those executed by agents.

> Java got popular because it forced everyone to code similarly

I think it, also, had a lot to do with the promise that most machines could run Java if they had the runtime installed

We are kind of spoiled today. It's easy to forget how insane it is that you can write a program in Go or Rust and build a binary for all major operating systems with a single command. It's so nice