Hacker News new | past | comments | ask | show | jobs | submit
In the era of LLMs, I often stop to think of Clojure. I believe it had a significant role in popularizing the concept of immutable data structures. Immutability simplifies the required context for understanding and solving problems. This benefits both humans and LLMs.

Would an LLM, or a person solely coding using them, have had the insight to work out that immutability is the way to go, and we should revolutionize software develoment? If LLMs had happened 15 years ago, would all code still be "place oriented programming", with higher token counts and less reliability than we have today thanks to better practices we've learned in the recent past?

If so, what are we missing out on in the future, now that stopping and thinking about code is frowned upon?

> If LLMs had happened 15 years ago

Functional programming and immutable data structures are much older than Clojure

> If so, what are we missing out on in the future, now that stopping and thinking about code is frowned upon?

"We" here is vague. In truth, the vast majority of programmers just use whatever is most convenient at their place of work and do not participate in, nor care about, the advancement of the craft. That has always been true.

I imagine that, as we enter an age where many programmers don't even read code anymore, those people will largely stop caring about programming languages and paradigms entirely. But, a few will still have to. Similar to how most programmers nowadays don't think about allocation and memory management, but a few still have to.

You're right that Rich Hickey didn't invent functional programming or persistent data structures. But he did a lot to advance the industry. I'm not saying it's solely thanks to him, but immutability is now the default in many places, which definitely wasn't the case 15 years ago.

And Rich didn't do what he did because he had to do it. He risked his own savings to go on this crusade, to make software development a happier place.

Who will take a risk like that in a world where no one writes code?

there will always be people who write code. just like there will always be expensive handmade goods, even though most goods are mass-produced in factories nowadays.
Clojure and Elixir both do really well in the LLM age. Functional programming in general, but those two in particular as they have a runtime/shell that agents can interop with directly to view/modify the code as it runs.

I actually just wrote about doing more clojure a few days ago

https://tuhat.net/@sbr/p/beam-to-jvm

>If so, what are we missing out on in the future, now that stopping and thinking about code is frowned upon?

You're probably asking this rhetorically, but if you were seriously asking, this would be one of those riddle sentences like "This sentence is a lie." If somebody had an idea that they could articulate in natural language on this forum, the natural language would be something an LLM could process and turn into better code. Any true answer could make itself false.

What we'd miss out on if stopping and thinking about code was no longer a thing, would be ideas that stem from direct human experience. Language models relate words to words. There's a lot of power in that, way more than one would think, but they don't relate words to direct experience, except as described in other words. Innovation comes when humans express their direct experience in new natural language, that other humans can benefit from, and eventually language models benefit from.

Aren’t these abstractions mostly meant to make reasoning about code easier for humans, and wouldn’t LLMs optimize for easy reasoning for LLMs?

Phrased differently: what would a language look like that’s optimized for LLMs?

This comes down to the question of how much LLM reasoning differs from human reasoning qualitatively. Maybe for the most part reasoning is just reasoning, so most things that help for human reasoning also help for LLM reasoning, and vice versa.
That's a good question. I do think that for example immutability is easier for LLMs as well, since it reduces the required amount of context for any give part of the software. But there might be even bigger wins out there for LLMs.

Is anyone out there trying to find these wins?

Well answering my own question, but I think a strong type system with clear error messages is extremely useful for an LLM.

Just look at how a system like LEAN allows LLMs to incrementally solve a problem. It absolutely wouldn’t get that far if it couldn’t rely on some type of compiler to verify things.

So yeah, a strong type system that allows lots of constraints to be expressed easily.

I think Haskell and Rust are much more “LLM-compatible” than Clojure.

And I say this as someone who has written Clojure full time for over half a decade.

Oh, absolutely. LLMs thrive with problems that are easy to verify. They don't always get it right, but the number of attempts they can do in a short time more than covers for it if verification is fast. Type systems are great for this.
At this point I often just pop into real tech threads (using tech with your own hands) to see how many But Now In The LLM Era top-level comments there are. And whether they follow the template of “now that there is <outcome I have asserted>, what philosophical ramifications does that have?” (For who? The humans that are not there?)

There’s where my reading habits are right now. I guess well played?

We had immutable data LONG before clojure was a thing. Immutability is good, but nothing new, ir nothing that should be forced.
You're right, but I wouldn't nullify Rich Hickey's hard work just because he didn't invent persistent data structures. He's done much more to the industry than just created a language. My question is, will we have more people like him in a world where people no longer spend hammock time thinking about code?