Looking to Create a New Language? Here’s What You Should Do

As software developers, we live in a world with a different language. That language can be frustrating and at times mystifying.

That got me thinking. What do we want in future languages and what should we prioritize in developing them?

So, if you are thinking about changing the status quo and have the chops to do it, read on. If you’re interested in peering through the crystal ball about what the future might hold for languages this article might just turn out to be invaluable for you two.

So let us strap in and without further ado see how to create a new programming language.

Then we can learn lessons from the language Python.

Favor Usability

If you build a new language, it makes sense to have arrays start at 1. Unfortunately, that isn’t going to fly as programmers typically expect zero-indexed arrays.

To be usable, we should conform to existing programming conventions. We don’t want to go back to when learning a new language felt like deciphering ancient hieroglyphs.

Any new language should favor clear syntax and readability over tradition or the ‘cool factor’. 

I remember my colleague suggesting rewriting an entire module “for fun”. We said we appreciated the thought, but no. Thank you.

Integrated Testing Framework

I’ve always said, “If you’re not testing, how do you know your code works?” But do we listen? Nope. 

With a new language, there is the chance to shine and put testing at the forefront of the developer’s mind. Bake testing right into your DNA, like chocolate chips in cookies — indispensable and deliciously necessary.

One of my colleagues at work advocates TDD. It’s a pity they don’t bother testing all of their classes. I keep writing comments on their PRs that they ignore (sigh).

AI Compatibility

I might not have a crystal ball, but here’s a safe bet: AI is not going to go away. The Internet didn’t come and go, and AI is the same.

So, if you are designing a new language, you’d better think about how it’s going to work with AI. Perhaps stop worrying about minimizing boilerplate code (because no human is going to write that anymore) or make writing tests a thing of the past.

Ignore AI, and you might as well be coding on a typewriter (or VIM).

Address Modern-Day Challenges

I’m not sure if you are aware. Coding challenges simply aren’t what they used to be. Rather than typing out machine code, we’re using high-level languages to tackle global, inter-connected, multi-threaded, real-time, often chaotic problems.

A language must be more than a tool; it needs to be a solution to the problems we have (not yesterday).

Inclusivity and Accessibility

If there’s one thing my keyboard has taught me, it’s that diversity matters — and not just in keystrokes.

A new language should be accessible to all, breaking down barriers rather than building new ones. Let’s have more onboarding and less gatekeeping. Another use for AI? Only if you bake it into the design.

Scalability 

Remember the ‘small project’ that suddenly became the backbone of your company’s IT infrastructure? Yeah, me too. 

Next-gen languages should be scalable by design, ready to grow from ‘just a script’ to ‘just saved the company’ without a complete rewrite. The same goes for when your app goes viral.

Eco-Conscious Coding

Here’s a novel idea: what if new languages helped write more energy-efficient code? Some tool to check the real-world cost of that server call?

It’s about time.

Work-Life Balance

This one’s a personal plea: let’s have a language that encourages work-life balance. No more 3 AM bug fixes as standard practice. Maybe a language that refuses to compile after hours? 

Maybe that’s a step too far, but you get my drift.

Things do need to change in the world of software development and a new language should support us in doing that.

Python Learnings

Python appeared in 1991 as a high-level programming language. The problem was it lacked some essential features. 

So, it felt inevitable that there would be a new version and in 2000 Python 2 appeared. Developers rejoiced, and Python 2 aimed to preserve backward compatibility with Python 1.

However, with the advent of Python 3 a deliberate decision was made. A decision to backward compatibility for the sake of long-term improvements to the language means that Python 2 code did not generally run under Python 3.

The decision to introduce these breaking changes was based on the belief that the long-term benefits of a cleaner, more consistent language outweighed the short-term inconvenience of migrating code from Python 2 to Python 3. The Python community provided tools (such as 2to3) and extensive documentation to assist in the transition, but the process was still more involved than previous upgrades within the Python ecosystem. 

This led to Python 2 code hanging around for a significant amount of time after the 2008 release of Python 3. You can still find such code around the corners of the Internet confusing junior developers.

Making changes for the long-term good is a great move. However this came at a great cost, and we should think about how to create great code from the beginning. This goes double when introducing a new language. Do it once and do it well.

Conclusion

A new language is difficult. Most of us struggle to code using the existing tools, so creating a new language seems like a real challenge.

However, if we are doing something that will help other developers perhaps, we should make sure we do it well the first time. Take that advice and apply it to your daily coding life.

Previous
Previous

The REAL Roadblock to Great Software Development

Next
Next

The Reason AI Won’t Take Your Coding Job