DEV Community

Cover image for I Built My Own Programming Language Because I Wanted Code to Read Like English
Avery
Avery

Posted on AI-assisted

I Built My Own Programming Language Because I Wanted Code to Read Like English

I’ve always found programming interesting, but there’s something about programming languages that bothered me.

You can know exactly what you want a program to do, yet sometimes the code required to express that idea feels much more complicated than the idea itself.

So I decided to try something:

What if I made my own programming language?

That language became Avery.

What is Avery?

Avery is a programming language I’m building with one main goal:
To make programming as easy to read and understand as possible.

I don't want someone learning Avery to constantly think about complicated syntax before they can even think about the problem they're trying to solve.

For example, here's a simple Avery program:

set name to ask "What's your name? "

print "Hello, " + name + "!"
Enter fullscreen mode Exit fullscreen mode

The intention is pretty obvious even if you've never programmed before.

Here's another example:

set number to ask "Enter a number: "

if number % 2 is 0 then
    print "Even"
else
    print "Odd"
end
Enter fullscreen mode Exit fullscreen mode

It's still programming, but I'm trying to make the code itself explain what it is doing.

No imports for common functionality

One of the design decisions I'm experimenting with is making commonly needed functionality available directly in Avery.

For example, generating a random number can simply be:

set number to random number between 1 and 100
Enter fullscreen mode Exit fullscreen mode

There's no separate import statement to learn first.

The idea is that if someone wants a random number, they should be able to simply ask Avery for a random number. The same philosophy applies to other built-in capabilities such as time and other functionality.

Why make another programming language?

There are already countless programming languages. Python is beginner-friendly. JavaScript runs almost everywhere. C and C++ are incredibly powerful. Rust provides powerful safety guarantees. So I'm not trying to replace any of them.

I'm interested in finding out how far I can take the idea of making programming syntax feel natural while still allowing people to create increasingly complex programs. I want to see whether simplicity can be a fundamental design principle rather than just a feature.

Avery is still young

Avery is nowhere near the maturity of languages like Python, and I'm not pretending that it is. It's an actively developing project. Some features are incomplete. Some syntax will probably change. And I'm still figuring out what should and shouldn't be part of the language. But that's also what makes building it interesting.

I've already been using Avery to test increasingly complicated programs, and those tests have exposed problems in my interpreter that I wouldn't have found with simple "Hello, World!" programs.

Every time something breaks, I get to improve the language.

What I want Avery to become

My long-term goal isn't simply to create a language with a bunch of features. I want Avery to have an identity.

Simple syntax.

Readable code.

Minimal setup.

Useful built-in functionality.

And eventually, enough power that people can build genuinely interesting programs with it.

Try Avery

Avery is open source and I'm developing it publicly on GitHub.

GitHub: https://github.com/KageyaKo/Avery

If you're interested in programming languages, interpreters, or language design, I'd genuinely like to hear your thoughts.

Especially criticism.

What would you change about Avery's syntax?

What functionality do you think should be built into the language?

And most importantly:
Would you actually want to program in a language like this?

Top comments (0)