You have 1 article left to read this month before you need to register a free LeadDev.com account.
Estimated reading time: 7 minutes
Your inbox, upgraded.
Receive weekly engineering insights to level up your leadership approach.
Niche programming languages, designed for very specific use cases, are facing a crossroads with the emergence of AI in software development.
Alessandro Giagnorio, a PhD candidate at the Università della Svizzera italiana, has studied the effectiveness of code generation for low-resource languages in the research paper, “Enhancing Code Generation for Low-Resource Languages: No Silver Bullet.”
The research found there was a gap in code generation performance between low-level languages when they have to compete with high-resource languages, such as Java and Python, for both open-source and closed-source commercial LLMs.
Horses for courses
When Nick Blow, chief technology officer of edtech startup Wakelet, wanted to use Javascript library SolidJS, the AI coding assistant he was using – Anthropic’s Claude 3.5 Sonnet – struggled. Its underlying large language model (LLM) was confusing SolidJS with React and introducing errors into the development process.
“I find that when I’m writing React, it saves me a lot of time to use these AI tools,” Blow said. “When I’m writing something that is not as well known, it’s a toss up.”
For example, Blow ended up moving from the Javascript framework SolidStart to the web framework Astro for that particular reason. Astro had much more data in the training set, allowing him to get the boost from AI coding tools.
David Bogue, a software developer at consultancy Sketch Development, had a similar experience with the latest version of Svelte, where AI coding tools weren’t picking up “the latest and greatest features.” Setting up hints via rules – such as what framework to use and providing documentation – made it better, but not perfect, he said.
In theory, AI should make it easier to use more niche, more secure, and less human readable languages, since LLMs can bring down the cost of development, Bogue said. In reality, it’s pushing us towards more popular languages because the models produce better and more reliable code with those languages due to the size of the training data sets available.
More like this
Becoming AI ready
One of the findings from the Università della Svizzera italiana research is that providing examples, such as how to use specific libraries and constructs, and then feeding this information to the LLM, greatly improves code generation for low-resource languages.
It’s also cheaper than trying to train the model directly on documentation, Giagnorio said. Having access to real world examples – such as code samples showing practical use cases and conversations about the code usage – are critical to how models have become so effective at coding.
The AI training gap
Github’s 2024 Octoverse report shows the vast amounts of data that is available for AI training with one billion contributions made to public and open-source projects across the year. Python, Javascript, and Typescript were ranked as the top programming languages based on distinct users contributing to projects for each language.
An analysis of Stack Overflow tags, one measure of publicly available training data, shows the disparity between information on popular programming languages and some of the more niche languages, such as Julia and Go.
AI firms are aware that their tools might not be up to scratch for niche languages. Software consulting company COBOL Cowboys, which specializes in the programming language COBOL, is being “bombarded by companies” wanting their consultants to test their AI tools, said Eileen Hinshaw, its cofounder and chief operating officer.
A 2022 survey, commissioned by Micro Focus, found that there’s still over 800 billion lines of COBOL in daily use in production, despite COBOL programming skills being in short supply.
“[Developers] will be the ones who drive how many languages we have,” Ty Dunn, cofounder of open-source AI coding assistant Continue, said. “Their actions and their stewardship of their niche programming languages will determine [whether] we have more or less.”
At Continue, Dunn has observed enterprises that use proprietary, or niche languages, storing examples within a central database, which becomes the bedrock for creating better code assistance.
The same idea can be applied to general purpose niche languages, he said. In an AI world, it’s important not only to make the source code available, but all the data in between, such as git commits, which show how a developer reached that point and can be used to help with model reasoning, he added.
Faster and smarter migrations
In the public sector, Joel Krooswyk, federal chief technology officer at AI-powered DevsSecOps platform GitLab, has observed LLMs being brought in to explore repositioning and refactoring applications that still rely on older programming languages and are struggling to scale. An agentic AI approach makes it much easier to understand and work with niche languages, he said.
“COBOL is a very big, very complex language, there’s a lot of contextual sensitivity to it, for instance,” Krooswyk said. “These agents now can look across multiple applications and say, ‘oh, I see what you’re doing there, I understand it now, let me refactor it for you.’ Whereas if we look back just six months, it was more challenging and it required a lot more human intervention.”
While it might seem like doom and gloom for the future of niche languages, the era of vibe coding – which is the creation of software applications via LLMs without writing code – could result in migrations to more performant languages.
A minimum viable product (MVP) might quickly be created in a scripting language, like Typescript, then years down the line projects may use an LLM to port it to a more performant language like Rust, Wakelet’s Blow said.
Rust adoption is something that Krooswyk is watching closely because of its continued rise in the rankings of top programming languages despite being less well known and having a reputation for being hard to learn because of its unique concepts such as ownership and borrowing.
Rust ranks as the 20th most popular programming language – up from 35th in 2020 – based on the number of unique pushes on Github. He sees vibe coding as a leading indicator for where software development is heading and that code abstraction will enable developers to adopt languages that weren’t as well known, such as Rust, which AI has recommended to him for recent projects.
“I didn’t ask for Rust, it just said, ‘oh, this will do it most efficiently,’ he said. “We’re seeing this shift into, well, what coding languages do I need to know and what do I need to know about them?”
An era of artisan developers
This trend could make discovery of niche programming languages easier than what would have been possible with Google search, Continue’s Dunn said.
If new project creations or migrations occur in more performant languages then it’s likely that specialists, similar to COBOL Cowboys, will crop up who have deep knowledge of these niche languages to step in and fix problems.
“People who deeply understand code will be incredibly valuable because they’ll just be so much more code whether it’s legacy maintenance or new code that was written by people who don’t as deeply understand the code,” Dunn said.
Software engineers are unlikely to be going anywhere soon, said Blow, as vibe coding only works well till it reaches a certain context size. Scaling vibe coding means reintroducing classic software engineering principles such as self-contained modules, unit tests, and small changes, he said.
The end of programming languages as we know it?
It’s also unlikely that niche programming languages will go anywhere soon either. Take for example, COBOL. Demand for COBOL knowledge is still there, with IBM coming out with classes on COBOL and mainframes, because it’s so powerful, said Bill Hinshaw, cofounder and CEO of COBOL Cowboys. Plus professional developers want to try more languages, Stack Overflow’s 2024 developer survey cites professional developers as wanting to try as many as eight new languages in the coming year.
Future programming languages are likely to be adapted to the AI environment. One example is Moonbit, a general purpose programming language for edge and cloud computing, which is designed to be AI friendly with an emphasis on clarity and simplicity.
According to a blog post, Moonbit adopts structural interface implementation, which eliminates the necessity for extra code blocks. A programming language without nesting has better readability and is “KV-cache friendly,” the post notes, referring to a caching technique used by LLMs to improve inference speed and efficiency.
“Are we out seeking to create new languages at this point for ourselves? I doubt it,” Krooswyk said. “From here out, anything that’s created is optimized for AI or optimized by AI or both.”
While there’s still room for new languages, the barrier to entry will be much higher, Blow said. It will need to somehow be cheaper and better than existing ones in industry, he said. Dunn predicts new avenues, like quantum computing and safety critical systems, could open the door for people to create new specialized programming languages.
“The world would be lost if we had fewer different cultures and languages in the world and I think the same thing applies for programming languages and communities,” Dunn said. “There are so many problems that would be much better solved and might only be possible to be solved with niche programming languages.”