DEV Community

Cover image for Stop Marrying Your Programming Language In You Next Project
Tomasz Jędrzejewski
Tomasz Jędrzejewski

Posted on Edited on

Stop Marrying Your Programming Language In You Next Project

Year 2022. The company is going to launch a new project. One of the very first choices the teams have to agree on is which programming language should we use for this? They look at the availability of developers, and whether the technology will be able to support their use cases in the foreseeable future. Or maybe the only driver was "nah, let's just use what we have"? Regardless of which group they were in, there was a common thing:

You had to live with your choice and all of its consequences for years to come.

You have to pay 3x more for servers, because your language scales poorly? Deal with it 🕶️. The other language turns out to have better libraries? Deal with it 🕶️. Some time ago, my current company completed a total rewrite of its IT system from PHP to Java/Kotlin - it took only 10 years. It was like marrying your language... or paying excessive costs of a divorce.

That was 2022, just before the AI revolution. Now, at the end of 2026, things look a bit different. The language is still relevant, but... in a different way, and definitely it's no longer a life decision. Let's learn why.

Programming Language Strategies Of 2022

Over the years, I've been working with several companies with vastly different strategies of choosing a programming language. It's interesting to see, how it affected the lifes of developers and the company.

  • YOLO: use anything, no questions asked.
  • Curated Choice: choice possible between a set of endorsed languages.
  • Monoculture: one language, one framework. Deal with it.

In one of the projects (I've been working on) in the YOLO company, the build system alone used 6 programming languages and 2 operating system. When the company closed down one of the offices, it turned out that they had to build an entire team of Erlang developers from scratch in another office, because one of the transferred projects was written in it. YOLO gave you freedom, but you could also run into extreme mess.

Curated Choice was a balanced alternative. Developers still had choice, but only from the curated list of supported technologies (e.g. defined with a Tech Radar). Here, I used to work in a setup, where we could choose between Java and Kotlin, and between Spring and Micronaut frameworks. Same ecosystem (✅), but still... switching between projects might have required learning another framework or jumping into another programming language (❌).

On the other extreme, we had Monoculture: a single programming language, framework for everyone. A variant of this approach was selecting a single language for a specific type of projects (e.g. Kotlin for backend microservices, Python for data engineering, etc.). Here, we optimize against the ability to transfer components and developers between teams, and accept making suboptimal technology choices from time to time.

What was common: the cost of changing the decision and rewriting the component/system was high. Everything revolved around it.

Programming Language in 2026: A Tactical Choice

The emergence of AI and Spec-Driven Development created an interesting opportunity. Previously, the source code was usually our only source of truth about the system behavior. I explored this topic deeply in my previous article "Spec-Driven Development: My Way to Fight Stale Specs". For us, two observations are important:

  • There is another entity, besides humans, capable of writing working source code at the high speed.
  • Specifications can now become the new source of truth.

The source code was so hard to replace because of human speed and the amount of business knowledge encoded in the statements. Now these are all gone. Replacing a source code is much easier and cheaper... and so is the language.

You can now treat Programming Language as a tactical choice - something, which serves your current needs, not necessarily your future ones. If circumstances change, rewrite.

Practical Example

This year, I started a side project: an API Collection with several utility API-s available over one of the API marketplaces. I write it in Spec-Driven Development and use it as a test ground for various ideas. The Programming Language Choice was one of them, and I basically had 3 options. I created a simple table with different factors rated from 1 (worst) to 3 (best):

Factor PHP Python Kotlin Notes
Do I know it? Yes Yes Yes
Library availability 1 3 2 For certain domains, Python has the most mature libraries
Scalability 1 2 3 I have the most experience in scaling JVM apps
Performance 1 2 3 JVM beats two other choices
Server cost 3 1 1 I have an existing hosting for PHP
Code maintainability 1 2 3 For long-term projects, statically typed languages win for me

That's my subjective rating. And look: the entry costs matter for a greenfield project, and I need to host the API somewhere. That's the cost that I need to pay with my own money without any guarantee to get it back. But in 2022, the choice would also limit my maintainability options for years to come. For PHP, I have an existing, quite performant hosting, but that's the least prospective choice. Eventually, I'd be choosing between JVM and Python, carefully balancing PaaS offers and evaluating free tiers. JVM is the most comfortable for me, but for Python, I have an extra option of Cloudflare Workers... very complex puzzle with planning ahead for the traffic that might never come.

In 2026, I chose... PHP, and it was a quick choice. The AI generates the code for me, and I have an existing, quite performant PHP hosting. I pay for it anyway, so I do not increase my infrastructure spendings - it's just good enough to start. I realized I can choose a solution just for now, and leave the future... to the future. My sources of truth are:

  • the specifications,
  • the API spec and language-agnostic test cases.

The rest of the software is fully disposable. If there is a justified reason to switch to another technology, I will just do it.

What's Still Relevant?

The choice of a programming language still matters for a couple of reasons:

  • Availability of supported tools and libraries - it's true that you can now just generate anything you need. For many utilities, you will just do it. But the question "who's going to maintain it" remains valid. New legal acts, such as European Cyber Resilience Act, put new responsibilities on software companies, increasing the cost of ownership. Careful choice of a programming language helps offload some of this cost elsewhere thanks to the access to mature libraries that other languages don't have.
  • Deployment - this is important especially for backend services. Larger companies tend to have well-organized deployment environments, with dedicated infrastructure teams and solutions. These environments do a lot of hidden, but critical work, such as regular patching of servers and infrastructure components. Specialization in certain technology stacks (e.g. JVM) helps keeping the complexity of that part at reasonable level and may be a part of the security strategy.
  • Performance and scalability - some programming languages are generally slower, some are faster. Some have lower memory footprint, some have higher. That's the fact. Nothing's changing here.
  • Security - certain programming languages do better job than others in preventing trivial errors that someone might turn into a weapon against us.
  • Interoperability - relevant in polyglot ecosystems, such as JVM, where different languages keep compatibility with Java, but not necessarily with each other (try to use a Kotlin library in Groovy - good luck 😉). Kotlin, Scala, etc. - are just fine for end applications. But if you write a library that should work across the entire ecosystem, you choose Java.
  • 🆕 Token cost - an interesting new factor. I once spoke to a team who evaluated different programming languages against their verbosity, and in turn - token cost.

Syntax, DSL capabilities, etc. - these factors are not as relevant as they used to be.

Rewriting Software - Does It Work?

OK, but did you actually rewrite any software in another language with AI?

Yes, I did it on a couple of occassions. In the previous article, Spec-Driven Development: My Way to Fight Stale Specs I showed one of the recent projects, where we decided to do a full, agentic rewrite of an important, in-house library with years of accumulated technical/maintenance debt. What I did not mention is that this rewrite also involved changing the programming language:

  • Old stack: Kotlin (production) + Groovy/Spock (tests)
  • New stack: Java

Interoperability was the decisive factor. Other developers wanted to keep Kotlin - is more compact, quicker and more fun 😉 to write, but I reminded them: "dudes, you're not going to write this code in person". We already struggled with compatibility issues within our own codebase (test suite in Groovy), the users also maintained codebases in different JVM languages, and Kotlin compatibility mode has its own quirks.

So yes - although we kept the original technology stack, we drove the AI agents to rewrite a mature project into another language using specs as a source of truth. Fun fact: two years earlier, we already considered rewriting the library, and we rejected it exactly because the costs were too high back in 2024.

Conclusion

AI is a game changer in many areas of IT industry. We can see, how it influences the choice of a programming language for your next project. This choice is still relevant in 2026, and there are decision drivers that still hold strong. The difference is that this choice is not strategic anymore:

You don't need to marry your programming language in 2026.

You can treat it as a tactical choice that you can amend later, if the circumstances change. You can even make your project Rewrite-Friendly, e.g. by building a language-agnostic test suite (JSON files with inputs and expected outputs) that you will be able to import later into any test framework. For me, the ability to change the programming language is now a part of my project maintenance toolbox. It opens a whole new space of opportunities that were not feasible in the past. And what do you think? Do you include such ability in your projects?

Top comments (0)