title: How to implement private method in ES6 class with Traceur
body: <p>I use Traceur Compiler to have advantage with ES6 features now. </p>
  
  <p>I want to implement this stuff from ES5:</p>
  
  <pre><code>function Animal() {
      var self = this,
          sayHi;
  
      sayHi  = function() {
          self.hi();
      };
  
      this.hi = function() {/* ... */}
  }
  </code></pre>
  
  <p>Currently traceur does not support <code>private</code> and <code>public</code> keywords (<a href="http://wiki.ecmascript.org/doku.php?id=harmony:classes" rel="noreferrer">from harmony</a>). And ES6 class syntax does not allow to use simple <code>var</code> (or <code>let</code>) statements in class body. </p>
  
  <p>The only way that I am find is to simulate privates before class declaration. Something like:</p>
  
  <pre><code>var sayHi = function() {
      // ... do stuff
  };
  
  class Animal {
  ...
  </code></pre>
  
  <p>It is better then nothing but as expected you can not pass correct <code>this</code> to private method without <code>apply</code>-ing or <code>bind</code>-ing it every time.</p>
  
  <p>So, is there any possibility to use private data in ES6 class compatible with traceur compiler?</p>