Re-order index page sections
* index.html: Moved 'Traits as Mixins', and 'Access Modifiers'website
parent
d04b968196
commit
9c86b0bddf
122
index.html
122
index.html
|
@ -19,15 +19,15 @@
|
||||||
<ul class="features">
|
<ul class="features">
|
||||||
<li><a href="#class-dfn">Simple and intuitive class definitions</a></li>
|
<li><a href="#class-dfn">Simple and intuitive class definitions</a></li>
|
||||||
<li><a href="#inheritance">Classical inheritance</a></li>
|
<li><a href="#inheritance">Classical inheritance</a></li>
|
||||||
<li><a href="#abstract">Abstract classes and methods</a></li>
|
<li><a href="#traits">Traits as mixins</a></li>
|
||||||
<li><a href="#interfaces">Interfaces</a></li>
|
|
||||||
<li>
|
<li>
|
||||||
<a href="#access-modifiers">
|
<a href="#access-modifiers">
|
||||||
Access modifiers (public, protected and private)
|
Access modifiers (public, protected and private)
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li><a href="#abstract">Abstract classes and methods</a></li>
|
||||||
|
<li><a href="#interfaces">Interfaces</a></li>
|
||||||
<li><a href="#static">Static and constant members</a></li>
|
<li><a href="#static">Static and constant members</a></li>
|
||||||
<li><a href="#traits">Traits as mixins</a></li>
|
|
||||||
<li>Support for ECMAScript 3+</li>
|
<li>Support for ECMAScript 3+</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -126,6 +126,64 @@
|
||||||
<a href="#" class="top">↑</a>
|
<a href="#" class="top">↑</a>
|
||||||
|
|
||||||
|
|
||||||
|
<h3 id="traits" class="bigemph">
|
||||||
|
Traits As Mixins
|
||||||
|
<span class="anchor"><a href="#traits">¶</a></span>
|
||||||
|
</h3>
|
||||||
|
<p>
|
||||||
|
Trait support was introduced in celebration of becoming a GNU
|
||||||
|
project. It is currently under development and has not yet been
|
||||||
|
finalized, but has been included in each GNU ease.js release since v0.2.0,
|
||||||
|
and is stable.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Documentation will be available once some final details are
|
||||||
|
finalized. Until that time,
|
||||||
|
the <a href="http://git.savannah.gnu.org/cgit/easejs.git/tree/test/Trait">test
|
||||||
|
cases provide extensive examples and rationale</a>. The following posts
|
||||||
|
also summarize some of the features:
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li><a href="news.html#ac1a036">Preliminary support for traits as mixins</a></li>
|
||||||
|
<li><a href="news.html#3005cda">Support for stacked mixins</a></li>
|
||||||
|
<li><a href="news.html#3fc0f90">Initial implementation of parameterized traits</a></li>
|
||||||
|
<li><a href="news.html#d9b86c1">Class supertype overrides</a></li>
|
||||||
|
</ul>
|
||||||
|
</p>
|
||||||
|
<a href="#" class="top">↑</a>
|
||||||
|
|
||||||
|
|
||||||
|
<h3 id="access-modifiers" class="bigemph">
|
||||||
|
Access Modifiers
|
||||||
|
<span class="anchor"><a href="#access-modifiers">¶</a></span>
|
||||||
|
</h3>
|
||||||
|
<p>
|
||||||
|
All three common access modifiers—public, protected and
|
||||||
|
private—are supported, but <a href="manual/Pre_002dES5-Fallback.html"
|
||||||
|
class="man">enforced only in ECMAScript 5 and later</a> environments.
|
||||||
|
</p>
|
||||||
|
<pre class="js">
|
||||||
|
<!--%inc scripts/ex/access-modifiers.js -->
|
||||||
|
</pre>
|
||||||
|
<p>
|
||||||
|
In the above example, the database connection remains encapsulated within
|
||||||
|
<tt>DatabaseRecord</tt>. Subtypes are able to query and escape strings and
|
||||||
|
external callers are able to retrieve a name for a given id. Attempting to
|
||||||
|
access a private or protected member externally will result in an error.
|
||||||
|
Attempting to access a private member from within a subtype will result in an
|
||||||
|
error.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Alternatively, a more concise style may be used, which is more natural to
|
||||||
|
users of JavaScript's native prototype model:
|
||||||
|
</p>
|
||||||
|
<pre class="js">
|
||||||
|
<!--%inc scripts/ex/access-modifiers-implicit.js -->
|
||||||
|
</pre>
|
||||||
|
<a href="manual/Access-Modifiers.html">→ Read more in manual</a>
|
||||||
|
<a href="#" class="top">↑</a>
|
||||||
|
|
||||||
|
|
||||||
<h3 id="abstract" class="bigemph">
|
<h3 id="abstract" class="bigemph">
|
||||||
Abstract Classes and Methods
|
Abstract Classes and Methods
|
||||||
<span class="anchor"><a href="#abstract">¶</a></span>
|
<span class="anchor"><a href="#abstract">¶</a></span>
|
||||||
|
@ -176,37 +234,6 @@
|
||||||
<a href="#" class="top">↑</a>
|
<a href="#" class="top">↑</a>
|
||||||
|
|
||||||
|
|
||||||
<h3 id="access-modifiers" class="bigemph">
|
|
||||||
Access Modifiers
|
|
||||||
<span class="anchor"><a href="#access-modifiers">¶</a></span>
|
|
||||||
</h3>
|
|
||||||
<p>
|
|
||||||
All three common access modifiers—public, protected and
|
|
||||||
private—are supported, but <a href="manual/Pre_002dES5-Fallback.html"
|
|
||||||
class="man">enforced only in ECMAScript 5 and later</a> environments.
|
|
||||||
</p>
|
|
||||||
<pre class="js">
|
|
||||||
<!--%inc scripts/ex/access-modifiers.js -->
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
In the above example, the database connection remains encapsulated within
|
|
||||||
<tt>DatabaseRecord</tt>. Subtypes are able to query and escape strings and
|
|
||||||
external callers are able to retrieve a name for a given id. Attempting to
|
|
||||||
access a private or protected member externally will result in an error.
|
|
||||||
Attempting to access a private member from within a subtype will result in an
|
|
||||||
error.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Alternatively, a more concise style may be used, which is more natural to
|
|
||||||
users of JavaScript's native prototype model:
|
|
||||||
</p>
|
|
||||||
<pre class="js">
|
|
||||||
<!--%inc scripts/ex/access-modifiers-implicit.js -->
|
|
||||||
</pre>
|
|
||||||
<a href="manual/Access-Modifiers.html">→ Read more in manual</a>
|
|
||||||
<a href="#" class="top">↑</a>
|
|
||||||
|
|
||||||
|
|
||||||
<h3 id="static" class="bigemph">
|
<h3 id="static" class="bigemph">
|
||||||
Static and Constant Members
|
Static and Constant Members
|
||||||
<span class="anchor"><a href="#static">¶</a></span>
|
<span class="anchor"><a href="#static">¶</a></span>
|
||||||
|
@ -226,33 +253,6 @@
|
||||||
<a href="#" class="top">↑</a>
|
<a href="#" class="top">↑</a>
|
||||||
|
|
||||||
|
|
||||||
<h3 id="traits" class="bigemph">
|
|
||||||
Traits As Mixins
|
|
||||||
<span class="anchor"><a href="#traits">¶</a></span>
|
|
||||||
</h3>
|
|
||||||
<p>
|
|
||||||
Trait support was introduced in celebration of becoming a GNU
|
|
||||||
project. It is currently under development and has not yet been
|
|
||||||
finalized, but has been included in each GNU ease.js release since v0.2.0,
|
|
||||||
and is stable.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Documentation will be available once some final details are
|
|
||||||
finalized. Until that time,
|
|
||||||
the <a href="http://git.savannah.gnu.org/cgit/easejs.git/tree/test/Trait">test
|
|
||||||
cases provide extensive examples and rationale</a>. The following posts
|
|
||||||
also summarize some of the features:
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><a href="news.html#ac1a036">Preliminary support for traits as mixins</a></li>
|
|
||||||
<li><a href="news.html#3005cda">Support for stacked mixins</a></li>
|
|
||||||
<li><a href="news.html#3fc0f90">Initial implementation of parameterized traits</a></li>
|
|
||||||
<li><a href="news.html#d9b86c1">Class supertype overrides</a></li>
|
|
||||||
</ul>
|
|
||||||
</p>
|
|
||||||
<a href="#" class="top">↑</a>
|
|
||||||
|
|
||||||
|
|
||||||
<script type="text/javascript" src="scripts/highlight.pack.js"></script>
|
<script type="text/javascript" src="scripts/highlight.pack.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
/* @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-v3-or-Later */
|
/* @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-v3-or-Later */
|
||||||
|
|
Loading…
Reference in New Issue