Roadmap for the Outlet Language
- Implement macros by simply eval'ing the macro code at compile time. When the compiler is written in Outlet, this will work in both js and lua since the native language will be hosting the compiler.
- Define the desired Outlet semantics in more details and flesh out the language with more constructs, which will heavily use macros
- Write a dead-simple interpreter in Outlet to execute Outlet code. This will purely be for debugging purposes.
- Implement a debugger in the interpreter that supports stepping through code and inspecting all sorts of stuff in a web interface
I will finish #1-3 pretty soon I think. At that point, I'll probably build a game with it. My goal for Outlet is to be a language to write games in. All the decisions, libraries, and code will be based around that. It will provide a great environment for games, and you can compile it out to a lot of platforms.
The interpreter will be a fun project, but will probably take the most time. It should help a lot though to build it only for the purpose of debugging, so I shouldn't need to worry about hardcore optimizations.
Why the S-expression syntax?
A lot of people aren't used to the syntax of Lisp, which is made up of parenthesized prefix expressions. An example is
(foo x y z) which calls the function
foo with the arguments
z. What's most confusing are operators because the difference is obvious:
(+ 3 2) adds 3 and 2. And then they look at larger examples of Lisp syntax and are completely turned off. Why would I want to manage all those parentheses?
This syntax is called "S-expressions" and before you discount it, remember that Lisp has been around for 40 years and loved by many. The community is small but passionate. And there's a reason, so let me try to explain why it works.
- The absolute simplicity of the syntax opens up new worlds. Macros are easy and incredibly powerful. Code and data blur together and look like one tightly integrated program.
- I can write parsers, compilers, debuggers, and more very quickly because of the syntax. The resulting code is shockingly simple.
- For the problem of aesthetics: I barely notice the parentheses. Seriously, have a look at my color theme.
- For the problem of editing: No serious Lisp programmer edits parantheses manually. You use something like Paredit, seen more here and here.
I never will expect something like Outlet to be wildly popular, but I hope to create a small community at least.