I’m making a language

Or as some would say I’m starting a new religion. But no, in all seriousness I am creating a new language as  part of my senior honors thesis. Why am I doing this? Because I need a good topic for my honors thesis and programming languages are what I’m really interested in. I also want to go to grad school next year for programming languages and I think the best way for me to learn about languages is to make one from the bottom up.

This is the first time that I’m making my own language, but I have been studying programming languages for the last 2 to 3 years. And I want to take those lessons learned and apply them. I’m trying to strike a balance between taking the best of what’s out there and putting in original ideas. There are a lot of great ideas out there but they’re spread across lots of different languages. Some languages like Ruby do a great job of pulling together the best of what’s out there. Under normal circumstances I would be perfectly happy with building a language that does nothing new. But this is an academic honors thesis and I would be really really disappointed with myself if I didn’t contribute anything new.

What am I going to do that’s new? I want to solve a problem that is actually being faced by programmers on the front line and though I admire the theory behind languages, I’m more interested in implementation than pure theory. One clear problem in our field is the rise of slower, parallel processors, multicore CPUs in particular. And we have very little idea of how to use all those cores probably. There are certainly solutions that are being proposed — threads, software transactional memory, Actors, so on and so forth. But these tools are generally considered beyond the reach of everyday programmers. What most programmers are acquainted with is object-oriented programming. My idea is to take an object oriented language and make it concurrent from the bottom up. The naive idea (that I have to significantly research and refine) is that each object is its own thread of operation. This is similar to the Actor model and I’ll need to study and think more to see how to differentiate between that and what I want to do.

But as I said there are a lot of good languages out there with great ideas and I’m going to shamelessly take as many of them as I can. Everything will be an object, but it will be prototype-based (a la JavaScript), not class-based. Syntax-wise it will be elegant and homoiconic: that is there will be as few special syntactical constructs as possible and programs will be data structures in the language itself. This is to lay the groundwork for macros, though I probably won’t be getting to that any time soon. However, it will have first class functions from day one and I’m going to try like hell to make everything (or make it possible to make everything) first-class. And this isn’t just for functions, I want to extend it to tests, constructs and even documentation. All of these are good ideas that have been tried and tested before, I’m just combining them in a new (and hopefully better) way.

Technology aside, the language will be completely open source, probably under the GPL v3. As for the name, I’m probably going to call it Parley. I want a name that implies discussion. Plus it opens up a whole world of pirate-related metaphors and names for later use and I love word-play. I don’t plan on really working on it until the end of August, though I will be reading up and throwing ideas around. Code will be on Github as soon as I have something that works.

Advertisements

Published by

Shrutarshi Basu

Programmer, writer and engineer, currently working out of Cornell University in Ithaca, New York.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s