Why create a new programming language?

It's a good question, isn't it? Why create a new language, when there's so many of them already floating around?

I struggled with this one for a while when I started dinking around with Aki. Maybe, I told myself, it makes more sense to contribute to the ecosystem of another, well-established language instead of trying to come up with one all on my lonesome.

Besides, one of the things I've found about programming languages is that it's not the language that is most important much of the time. It's the ecosystem -- it's the runtime, it's the libraries, it's the userbase. A big part of why I'm building Aki in Python, at least the first time out, is because of this richness.

If I start entirely from scratch, I'm forced to reinvent everything. And that in turn reminded me of yet another line I read once, by sociologist Paul Goodman in reference to literary studies:

... starting from scratch, without literary tradition altogether, writing and reading are imbecile and trivial; ancient errors are tiresomely repeated; platitudes are taken for ideas; hard won distinctions are lost; useful genres have to be reinvented, like reinventing shoes or learning to boil water.

I wasn't thrilled by the idea that I was essentially condemning myself to reinvent shoes and boil water. And most likely do it badly, to boot.

All this forced me to think about my motives. What's the real purpose here -- to build something that will displace existing programming technology, to complement it, to critique it? (In the sense that sometimes the best critique of something is another instance of that thing in a different form.)

After much gear-grinding, I came up with the following motives:

Use the language as a sandbox for experimentation

A new language, with no legacy constraints, is a wonderful sandbox for experiments in source form, type theory, etc. I am not brilliant enough to understand the bramblier regions of type theory (don't ask me what a functor is), but maybe learning-by-doing can give me a deeper understanding.

Use building the compiler as an exercise in discipline

Building a compiler is difficult, even when you have a language ecosystem as rich as Python's to help you do it. Such work forces you to think systematically, an order of magnitude more systematically than before. I've been a mediocre programmer for far too long, and taking on the responsibility of a project like this is one way to level up. (And so far I'm embracing it pretty enthusiastically.)

Use the whole thing as a way to explore an ecosystem in miniature

When I realized how much work was involved in creating an entire language -- the standard library, the platforms support, all of it -- I thought, what if we just put in enough of all of the elements in question to keep it proof-of-concept? A standard library with only a couple of modules in it; a package manager with only a couple of packages, etc. That way, the empahasis is on polishing the implementation, which is unique to this ecosystem, rather than things which are common to pretty much every language anyway.

Note the words that keep surfacing: practice, discpline, proof of concept, exercise. All this told me what I had was not about replacing or displacing anything, but about creating something that was, at bottom, a self-improvement project.

If that's all Aki turns out to be, great! It's not like we have any shortage of languages anyway.