Some Programming Evolution

I’ve come an awful long way since the last time I posted to this blog. To catch you up a bit, I’ve become enamored with David Barbour’s RDP programming model, I’ve ported my Arc libraries over to JavaScript (and added to them), I’ve even ported Conan Dalton’s Rainbow (an implementation of Arc in Java) to JavaScript, and generally I’ve just been hacking away in JavaScript. I like JavaScript’s non-broken lexical scope, and I like the fact that it has a real language standard rather than a reference implementation, but most of all, as I mentioned last time, I like how everything I do in JavaScript can run in the browser. Even my static site generator runs in the browser now (but sorry, there aren’t any good examples of how to use it).

Type wild

During this time, the potential value of static type systems has become quite clear to me. For the most part I still really don’t care about protecting programmers from their own mistakes. Instead what I value is the ability to make promises about program behavior that untrusting parties can verify on their own (for non-hackish metaprogramming and secure code distribution), the ability to write expressive abstractions that don’t sacrifice any run-time performance, and the ability to infer a program’s implementation from its interface. I still like the dynamic programming ideal of putting lots of power in the programmer’s hands… but whence else comes this power? Rather than stubbornly reinventing the existing static type research under some other name, I embrace it.

Introducing Chops

Recently I’ve been doing a lot of my exploratory programming in JavaScript, thanks to the fact that I know it’ll run on crazy platforms like the 3DS. -_^ I’ve programmed in JavaScript off and on since high school, and boi has my JavaScript style changed…. @_@

JavaScript’s lack of macros is a bit troubling for me, especially given the recent tendency for JavaScript programmers to deal in lots of nested asynchronous callbacks: “Unindented functions to clean callback mess.” “Asynchronous callbacks in JavaScript”

I haven’t felt the pain of the asynchronous callback nesting problem firsthand, but I know a horror close to that one: Monadic programming in Groovy. Observe the indentation.

In fact, that indentation-heavy part of the Blade code is what originally got me fed up with using Groovy and interested in making Penknife as an intermediate project on the way to Blade. Well, my work on Penknife has been so focused on modularity and hygiene that it’s slack on what really matters: Syntax. Oh, syntax, how you really really matter so! :-p

Continue reading