07.09.10

This is just a brief note to point out that, as of the August 29th Firefox nightly (and I think as of the latest beta, but don’t quote me), SpiderMonkey (and Firefox) now implements ES5‘s new Function.prototype.bind method — native support for creating functions bound to a pre-specified this value:

As always, you can experiment with a version of Firefox with Function.prototype.bind by downloading a nightly from nightly.mozilla.org. (Don’t forget to use the profile manager if you want to keep the settings you use with your primary Firefox installation pristine.)

ECMAScript accessor syntax in SpiderMonkey

For quite some time SpiderMonkey and Mozilla-based browsers have supported user-defined getter and setter functions (collectively, accessors), both programmatically and syntactically. The syntaxes for accessors were once legion, but SpiderMonkey has pared them back almost to the syntax recently codified in ES5 (and added new syntax where required by ES5).

SpiderMonkey has historically parsed literal accessors using a slightly-tweaked version of its function parsing code. Therefore, as previously explained SpiderMonkey would accept essentially anything which could follow function in a function expression as valid accessor syntax in object literals.

ES5 requires accessors have exact numbers of arguments

A consequence of parsing accessors using generalized function parsing is that SpiderMonkey accepted some nonsensicalities, such as no-argument setters or multiple-argument getters or setters:

SpiderMonkey has now been changed to follow ES5. There seemed little to no gain in continuing to support bizarre numbers of arguments when the spec counseled otherwise, and any code which does end up broken is easily fixed.

As always, you can experiment with a version of Firefox with these changes to accessor syntax by downloading a nightly from nightly.mozilla.org. (Don’t forget to use the profile manager if you want to keep the settings you use with your primary Firefox installation pristine.)

06.08.10

I suppose I should appreciate inexplicably being entered in your subscriber database since the May 2010 issue.

I suppose I should appreciate being sent glossy pages full of pictures of beautiful new cars. I do enjoy slick cars, after all (although to be honest, I’d take a classic car any day over something new). (Still, I much prefer to see the physical versions over mere pictures.)

But that doesn’t change the fact that I am perhaps the least likely person to ever succumb to the temptations posed most directly by the cars in your pages, or the accessories of all sorts advertised amongst them. I am a complete losing proposition for you: I don’t pay for your magazine, and I won’t pay your advertisers for it, either.

Maybe you think, because I’m in the 18-24 male demographic, the products in your pages will entice me. I think you will find few people so anomalous as me in that population. I don’t own a car (I bike), I rarely need a car (and on those occasions, borrowing or renting is significantly cheaper), and I don’t plan to own a car in the foreseeable future. And, for as long as I live in the Bay Area, that’s very unlikely to change.

I do appreciate your willingness to send me something for nothing. My office appreciates this, too. (Or at least it appreciates it no less than I do.)

But a friendly suggestion: if you really want to give someone a free subscription to your magazine, give it to someone who might actually read it.

(And in the unlikely event that someone decided to give me a subscription [presumably despite knowing just how little I care about cars] and I somehow missed the new-gift-subscription notice, I’m really sorry, but this magazine just isn’t for me: it’s complete deadweight loss. How about in the future we go do something fun together, mutually agreed upon, instead?)