Tuesday, June 10, 2008

Javascript is generally regarded as a really weak language. Objects and classes in particular are unnecessarily verbose, and there doesn't seem to be a good REPL (there are some REPLs, but they're all lousy. Could be a problem with my terminal settings, I suppose, but I don't think so). As it turns out, though, Javascript has - as is so often the case - some really unexpected features. It has, for instance, first class functions; a function's return type can be another function (allowing currying), and you can pass a function as an argument. This is a pleasant surprise.

Should also make it easier to reimplement this all in Python in a sensible way, when the time comes. Might also be fun to do a web-based implementation in CLisp, even if that's outside the requested specs ... of course, if I want to start writing real-world code in Lisp, I probably should look the part. I already use too many parentheticals; it's just time to represent them all using actual parentheses.

0 Comments:

Post a Comment

<< Home