News for hackers. Stuff that matters.
Re:Prototypes are Objects by braythwayt on Sunday June 14, 2015 @08:33AM (#9714665)
TFB(ook) by TFA(uthor) of TFA(rticle) discusses the issues with open recursion, and describes a pattern for using ECMAScript 2015 symbols to address this exact problem:

    const books = Symbol(“books”);

    const BookCollector = {
      addToCollection (name) {
        this.collection().push(name);
        return this;
      },
      collection () {
        return this[books] || (this[books]= []);
      }
    };

There are no comments on this comment yet.