CoffeeScript is a new syntax for JavaScript. The idea is to fix some of JavaScript’s deficiencies while staying so close to it that one can handle the “compiled version” in an emergency. I like the idea, but not all of it is an improvement. This post will first critique CoffeeScript and then present Brendan Eich’s simplified “paren-free JavaScript”.
Copying links to web pages is tedious, because you have to go to them twice in order to copy both URL and title. The following three bookmarklets help speed up that process by letting you copy everything in one go. Click on a link to try it out or move it to the bookmarks bar to use it later, on any page.
A bookmarklet is a bookmark whose URL (web address) contains a small program that does something useful with the currently displayed web page. To execute the program, you click on the bookmark.
Update 2011-06-25: “Prototypes as classes” is an improved version of this blog post.
In this post we present the Proto API which implements inheritance in JavaScript in a purely prototypal fashion. This contrasts it with all other JavaScript inheritance APIs that the author is aware of.
JavaScript is relatively weak when it comes to reflection and metaprogramming. Let us see what you can and cannot do. This post uses some of the standard methods of ECMAScript 5 (ES5).