Brillskills Blog

  • JavaScript subclassing using Object.create

    In my previous post, I talked about how Microsoft’s TypeScript was able to build simple class-based inheritance on top of JavaScript’s prototypal inheritance. To recap, the compiler includes a short function named extends that handles rejigging the prototype chain between the sub-class and the super-class to achieve the desired inheritance. [javascript] var __extends = this.__extends […]

  • Exploring JavaScript prototypes via TypeScript’s class pattern

    Note: All the diagrams below were created using Gliffy, a fantastic web-based diagram editor. The latest version has been rebuilt using HTML and JS instead of Flash, and it really is a joy to use. In this post, I’m going to take a close look at how JavaScript’s prototypal inheritance works by analysing how Microsoft’s TypeScript language uses […]

  • Polyfills have a PR problem

    A recent Twitter discussion with an old colleague pointed to a problem the Extensible Web may have gaining traction, which is the bad reputation that polyfills have with some experienced front-end developers. They are seen as memory and CPU hogs, applied without much thought as an easy way of getting around a problem that could […]

Got any book recommendations?