From the coffeescript homepage:

Underneath all of those embarrassing braces and semicolons, JavaScript has always had a gorgeous object model at its heart.

That sums up my feelings about javascript almost exactly.

JavaScript Is Sweet

While reading Oliver Steele’s article on JavaScript Memoization this bit jumped out at me.

function Angle(radians) {this.setRadians(radians)}
Angle.prototype.setRadians = function(radians) {
  this.radians = radians;
Angle.prototype.getDegrees = function() {
  return this.radians * 180 / Math.PI;
memoizeConstantMethod(Angle.prototype, 'getDegrees'); 

The reason that jumped out is that getDegrees is a function that returns a number, but in the above code you see this this.getDegrees.reset(). In other languages that would require a reset method on number objects, but not in JavaScript. In JavaScript methods are objects and, therefore, can have methods of their own1. This allows you to get the effect of high-order messaging without all the fuss.

  1. Is that the exact semantics that allows this functionality in JavaScript?