Monday, May 11, 2009

Happy 1st Birthday, Reia!

Reia turns one year old today, as measured by the first commit to the Reia repository (well, not literally, there was one commit of the leex code before it which isn't mine). Later that day I'd begin fleshing out the scanner (with leex) and the initial grammar (with yecc). I'd been playing around with leex and yecc before but this was the first time I really tried to put it together into a coherent language, one which could at least calculate things with C/Algol-style syntax.

Things have come a long way from then! I never would've thought I'd give a talk about Reia before it was even a year old. I've noticed most language designers like to tinker in obscurity for a few years before releasing their creations to the world. I've instead just thrown it up on github and let anybody who wants poke around with it and send me patches.

In the past year, I've managed to implement the following features in Reia:
  • Ruby-like syntax with destructive assignment
  • Rich set of "builtin" types including integers, floats, strings, atoms, tuples, lists, maps (i.e. dicts), "binaries", regexes, funs (i.e. lambdas), process pids, and constants (i.e. module/class names)
  • Pattern matching
  • Asynchronous object system based on Erlang processes with single inheritence
  • Erlang-style processes (i.e. Actors)
  • Ruby-style blocks
  • Function/method references via Python's receiver.method syntax (implemented as funs)
  • List comprehensions
  • (Almost) pure expression grammar, allowing modules and classes to be defined on the shell
  • Self-hosted test system for the language itself
  • Interpolated strings
There are many future features on the roster. Stay tuned and I'll have a series of follow up blog posts on what I'd like to add.