Archive | February, 2011

On unhygienic macros

Unhygienic macro systems are not useful for architecting large systems of perfect, pure modules. They’re great for sketching out abstractions that work on a semi-local level.¬†They essentially enhance your ability to quickly reinvent the wheel, which is very valuable since, despite our perennial efforts to make it otherwise, the wheel must be reinvented quite often [...]

Read full story Comments { 0 }

Lisp representation for the JS dot operator

I once took a poll on Arc Forum about the most ergonomic lispy representations for JavaScript dot notation. Recently I’ve been taken by all the options Clojure provides for its Java Interop and am inspired to consider similar possibilities for LavaScript:

Read full story Comments { 0 }

Fexprs and laziness

I believe there is a connection between fexprs and laziness. It could be that programming mostly in fexprs and only using eval when necessary gets you something like what lazy evaluation does for Haskell. However, it may be problematic to build programs mostly out of fexprs rather than functions.

Read full story Comments { 0 }

JavaScript representations of cons

1) Efficient implementation, but doesn’t allow for improper lists: ['a', 'b', 'c'] car = function(xs) { return xs[0]; } cdr = function(xs) { return xs.slice(1); }

Read full story Comments { 0 }