Below is a message I wrote about API implications https://clojurians.zulipchat.com/#narrow/channel/151168-clojure/topic/Should.20we.20stop.20making.20small.20libraries.3F. The main question it is trying to ask is what should be changed about our approach to library-writing and abstraction. > Should we stop making small libraries? > Today, I had a call with my friend Ynon Perek, an experienced engineer who has written and taught many languages. > We explored https://echarts.apache.org/en/index.html and were impressed by a few of its features, such as https://apache.github.io/echarts-handbook/en/concepts/dataset/, the way to https://apache.github.io/echarts-handbook/en/concepts/dataset/#map-from-data-to-charts-(series.encode), https://echarts.apache.org/handbook/en/how-to/animation/transition/, overall performance, and the https://echarts.apache.org/examples/en/index.html of https://echarts.apache.org/examples/en/editor.html?c=treemap-sunburst-transition. > We saw that sometimes, Echarts specifications are a bit verbose. E.g., when you wish to place https://echarts.apache.org/examples/en/editor.html?c=data-transform-multiple-pie together, you need to specify their locations over the canvas. > I commented that, alongside https://scicloj.github.io/noj/noj_book.echarts by Zuzhi Hu Ken Huang, and our plans to extend it, we might try writing a Clojure library that would target ECharts but have its own API (maybe a part of https://scicloj.github.io/tableplot/). That way, we would have our own succinct way of expressing things, and the library would automatically take care of placing those pie charts, etc. > Ynon did encourage me, but had a few insightful comments: > • If a library introduces an API different from the original API, it needs to be documented carefully (as we do in Tableplot, I think). But even if it is documented carefully, LLMs might not know it so well. > • New programmers ask the AI first. They will get a great answer for Echarts (as Ynon demonstrated quickly), but a poor answer for our new little library. > • This situation is a problem for almost any new little library. > • For similar reasons, today's and the future's coding might become more verbose and avoid abstractions. It is often easier (for the programmer and the AI) to read and write big JSON specs (including those explicitly placed pie charts) rather than functions that cleverly generate those specs. > • In other words, abstraction might become an anti-pattern (or at least be perceived as such). > Of course these are speculations, but they at least raise the question of whether we need to change anything about what we do.
I started to compose my thoughts, then went and read the thread on Zulip, and @p-himik echoed exactly my thoughts on this: • Your argument applies to any new library, not just small wrappers around well-known libraries, and • LLMs are improving fast enough that changing our behavior to account for the state of LLMs today is short-sighted -- keep doing what we do and let LLMs just catch up. We want LLMs to get better -- not for us to get worse.
I don’t intend to change the way I program in ways that are more legible to LLMs and less legible to people reading my code (even if the only such person is me 3+ months from now).
The idea of forgoing abstraction in statistical graphics in particular, to me, cuts directly against everything that’s valuable in a book like The Grammar of Graphics. The whole point of a well-designed and specified abstraction is that it forces you to think about the problem in a way that better represents the problem domain. When you practice and internalize this model, you can begin to think of novel ways to apply it, or get creative ideas for how to use it that don’t even necessarily apply to any specific “problem.” Creative (mis)uses of ggplot2 like https://art.djnavarro.net/’s emerge out of understanding the library well enough to use it beyond its “standard” context. I don’t know if LLM prompting for “solve problem X for me” is open ended in this way.
Code generation has always been a code smell to me, and LLM-generated code is no exception. If code can be mechanically generated, that is a sign that abstractions in the program or the language itself are not strong enough. I include LLMs in this category. While it's true that they can write some types of code effectively, the types of code they are good at are precisely the sort of verbose, unoriginal boilerplate that in an ideal world would be abstracted away to start with. I'm not saying LLMs should have no part in the process of creating software. But dumbing down the expressiveness and abstraction of our code so that LLMs can deal with it is completely wrongheaded and backwards. We should think of the LLM more like a compiler than a programmer. Computer code is, by definition, the point at which the capabilities of a machine meet the capabilities of a human. Over the course of software history, as computers have evolved, that point has moved. We used to need to write assembly, now we have compilers to allocate our registers for us. We used to need to manage memory, now VMs do that. LLMs definitely represent a step change in what computers can do. But rather than have them spew code at our current levels of abstraction (or even less abstract, as seems to be proposed here) and increasing the amount of mediocrity in the world, we should figure out how to leverage them to write code at a higher level of abstraction. To make US more powerful.
That is such a nice interpretation of things.
To rephrase the question: In 2025, should we do anything differently if we want to create Clojure tools and libraries which are actually friendly to people who are new to programming?
So accepting the your premise (A) that newbies will "ask the AI first", and that (B) a LLM can only cover what it was trained on, the only conclusion I can see is either "don't make new things" or "don't expect newbies to use new things." I don't like either premise, (A) for philosophical reasons and (B) because LLM retrieval is still in its infancy and likely to improve.
Thanks. I am asking a practical question about the current state of things. I do not understand LLMs and need to make beginner-friendly libraries that will grow well in 2025, so I hope to learn some recommended practices from people who may have an idea of current trends.
I would just make the best thing you can and document it well. Stay simple, stay clear. It's good for humans and for LLMs. LLMs (out of the box) are inherently backward-looking. They can reproduce what people have already done in the past. If your goal is for LLMs to be trained on your stuff, this is a "the best time to plant a tree was 5 years ago, the second best time is right now" situation.