1
0
Fork 0
easejs/lib
Mike Gerwitz 3005cda543 Support for stacked mixins
The concept of stacked traits already existed in previous commits, but until
now, mixins could not be stacked without some ugly errors. This also allows
mixins to be stacked atop of themselves, duplicating their effect. This
would naturally have limited use, but it's there.

This differs slightly from Scala. For example, consider this ease.js mixin:

  C.use( T ).use( T )()

This is perfectly valid---it has the effect of stacking T twice. In reality,
ease.js is doing this:

  - C' = C.use( T );
  - new C'.use( T );

That is, it each call to `use' creates another class with T mixed in.

Scala, on the other hand, complains in this situation:

  new C with T with T

will produce an error stating that "trait T is inherited twice". You can
work around this, however, by doing this:

  class Ca extends T
  new Ca with T

In fact, this is precisely what ease.js is doing, as mentioned above; the
"use.use" syntax is merely shorthand for this:

  new C.use( T ).extend( {} ).use( T )

Just keep that in mind.
2014-03-15 21:16:27 -04:00
..
ClassBuilder.js Base class now has __cid assigned to 0 2014-03-15 21:16:27 -04:00
FallbackMemberBuilder.js [no-copyright] Modified headers to reduce GPL license notice width 2014-01-15 23:56:00 -05:00
FallbackVisibilityObjectFactory.js [no-copyright] Modified headers to reduce GPL license notice width 2014-01-15 23:56:00 -05:00
MemberBuilder.js Support for stacked mixins 2014-03-15 21:16:27 -04:00
MemberBuilderValidator.js Added support for abstract overrides 2014-03-15 21:16:27 -04:00
MethodWrapperFactory.js [no-copyright] Modified headers to reduce GPL license notice width 2014-01-15 23:56:00 -05:00
MethodWrappers.js Began Scala-influenced linearization implementation 2014-03-15 21:16:27 -04:00
Trait.js Support for stacked mixins 2014-03-15 21:16:27 -04:00
VisibilityObjectFactory.js [bug fix] Corrected bug with implicit visibility escalation 2014-03-15 21:16:26 -04:00
VisibilityObjectFactoryFactory.js [no-copyright] Modified headers to reduce GPL license notice width 2014-01-15 23:56:00 -05:00
class.js Support for stacked mixins 2014-03-15 21:16:27 -04:00
class_abstract.js Added support for weak abstract methods 2014-03-07 00:47:43 -05:00
class_final.js [no-copyright] Modified headers to reduce GPL license notice width 2014-01-15 23:56:00 -05:00
interface.js Validation warnings now stored in state object 2014-03-15 21:16:26 -04:00
prop_parser.js Added support for `weak' keyword 2014-03-07 00:47:43 -05:00
util.js Added support for abstract overrides 2014-03-15 21:16:27 -04:00
version.js.in [copyright] Copyright update 2014-01-20 22:55:29 -05:00
warn.js [no-copyright] Modified headers to reduce GPL license notice width 2014-01-15 23:56:00 -05:00