Echo JS 0.11.0

<~>

ndgaulin 3864 days ago. link 1 point
I think it is also worth noting another quick point that I forgot to mention regarding jTypes Lite:

Remember that ES6 will include Symbols, which will effectively allow classes to have encapsulation (through private and protected members). This will make it significantly easier to hide information in objects than what is currently offered in ES5 (but I don't think too many people are going to argue about how unproductive and unreadable the ES6 syntax is, comparatively -- http://tc39wiki.calculist.org/es6/symbols/). JavaScript developers will quickly find that it is much easier to reference class members as "this.someSymbol" instead of "this[someSymbol]" once they start using the ES6 syntax.

So with that being said, jTypes Lite will utilize Symbols behind the scenes during both compilation and instantiation. This will obviously make things significantly faster, but still save the developer all the trouble of having to work with the Symbol syntax, along with providing all the other benefits that jTypes Lite offers as well. However, classes that are defined in jTypes Lite as opposed to ES6 will still have the option to fallback to ES5; therefore providing the ability to define encapsulated data in a simple and concise manner, and that also won't require the developer to make any changes to their code when ES6 becomes readily available by browsers (and instead they can code it today on ES5). So again, it's quite obvious how jTypes offers the best of both worlds in that regard.
ndgaulin 3864 days ago. link 1 point
Here is some background information for those that are interested:

jTypes Lite is a new library we've recently released that is a much more lightweight build of jTypes. It doesn't construct a complex instance matrix as the full version does (no polymorphism); and therefore has no virtual/abstract/override members, and no type-casting either. Instead, jTypes Lite builds a robust prototype-chain (similar to native JavaScript classes), but with multiple access levels for ES6-like encapsulation. Then at instantiation-time, only a single public instance object (along with some private context objects) is created. This simplicity allows jTypes Lite to instantiate classes up to 5X faster than the full version, and only requires 5 KB gzipped (14 KB minified). So if you're looking for a lightweight alternative to jTypes that provides ES6-like encapsulation (but works today in ES5), then jTypes Lite just may be the tool for the job!