Creating objects via constructor functions is fairly straightforward in JavaScript. But as soon as you want to do inheritance, things become complicated. This post examines how inheritance works in traditional JavaScript. It then presents four APIs that make things easier, without adding too much bulk to the language: ECMAScript 5, YUI, Prototype.js, and John Resig’s Simple Inheritance.
Ich war vorgestern auf einem Vortrag über die zweite münchner Stammstrecke, gehalten von Martin Runge, dem Fraktionsvorsitzenden der Grünen im Landtag. Da bei diesem Thema Parteiinteressen eine relativ geringe Rolle spielen (OB Ude ist für die zweite Stammstrecke, ebenso die Staatsregierung), war ich mir relativ sicher, objektiv informiert zu werden. Dieser Blogeintrag ist meine Mitschrift des Vortrags. Als Münchner ist es wichtig, die folgenden Tatsachen zu kennen, denn momentan besteht noch die Möglichkeit, die zweite Stammstrecke zu verhindern und die in vielerlei Hinsicht bessere Alternative des Südrings zu ermöglichen. Zusammenfassung: Die zweite Stammstrecke ist weit teurer, als wir uns momentan leisten können, bringt erstaunlich wenig, und würde erst sehr spät fertig werden.
David Herman has posted a video of his talk on what he calls ECMAScript.next, the next version of JavaScript. Others call it “JavaScript Harmony”. It nicely complements my recent post on Brendan Eich’s ideas for Harmony [1], with a little overlap, but not much.
Roadmap for ECMAScript.next:
Spring 2011: proposal freeze (no more proposals allowed)
2013 (roughly): spec finished, parts will be in browsers before that.
opt-in via MIME type in script tag: <script type="application/javascript;version=next"> (where “next” is a placeholder for something that has still to be determined)
Broad themes:
Fixes: removing quirks
Expressiveness: support better, more concise idioms
The business card is one paper-based product that is still useful in this digital age (that might change if near field communication becomes more popular and you can just tap devices together to exchange contact information). This post lists what you should put on your business card, with special considerations for online-dwellers.
In
“Closure Versus Prototypal Pattern Deathmatch”, Brendan Eich examines the question whether, when creating objects, the closure pattern or the prototypal pattern is more efficient.
This blog post explains how variables are scoped in JavaScript. It points out two things that can cause problems if you are not aware of them: JavaScript variables are function-scoped and they can be captured in closures.
The amount of creativity currently happening the realm of JavaScript (JS) is simply amazing. People invent all kinds of nifty tools and extensions. But with that comes fragmentation and the proliferation of JS frameworks has turned JS into an assembly of incompatible sub-languages. In contrast, Java has standardized the following six things and JS should do the same. After listing them, this post points out consequences (tooling!) and future developments.