Mercurial Hosting > luan
comparison website/src/diff.html.luan @ 685:1e4b0bc0202d
update documentation
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sat, 16 Apr 2016 22:37:47 -0600 |
parents | b73f005f3735 |
children | 33f1b4ad2c9d |
comparison
equal
deleted
inserted
replaced
684:41f791e4206d | 685:1e4b0bc0202d |
---|---|
102 | 102 |
103 <h3 heading><a name="meta">Metatables and Metamethods</a></h3> | 103 <h3 heading><a name="meta">Metatables and Metamethods</a></h3> |
104 | 104 |
105 <p>Luan only has metatable for tables, not for other types.</p> | 105 <p>Luan only has metatable for tables, not for other types.</p> |
106 | 106 |
107 <p>Luan does not support the <b>call</b> metamethod. There is nothing that one can do with the <b>call</b> metamethod that can't be done more cleanly with closures, so this was left out.</p> | |
108 | |
107 <h3 heading><a name="gc">Garbage Collection</a></h3> | 109 <h3 heading><a name="gc">Garbage Collection</a></h3> |
108 | 110 |
109 <p>Luan uses Java garbage collection. Luan has no special garbage collection methods.</p> | 111 <p>Luan uses Java garbage collection. Luan has no special garbage collection methods.</p> |
110 | 112 |
111 <p>Luan does not yet have weak tables but this will be added.</p> | 113 <p>Luan does not yet have weak tables but this will be added.</p> |
116 | 118 |
117 <h2 heading><a name="lang">The Language</a></h2> | 119 <h2 heading><a name="lang">The Language</a></h2> |
118 | 120 |
119 <h3 heading><a name="lex">Lexical Conventions</a></h3> | 121 <h3 heading><a name="lex">Lexical Conventions</a></h3> |
120 | 122 |
121 <p>Unlike Lua, Luan generally considers the end of a line to be the end of a statement. This catches errors and encourages readability. The exception to this is in paranthesis <em>(...)</em> where the end of line is treated as white space.</p> | 123 <p>Unlike Lua, Luan considers the end of a line to be the end of a statement. This catches errors and encourages readability. If you want to continue a statement on another line, you can use a backslash followed by a newline which will be treated as white space.</p> |
122 | 124 |
123 <p>Luan has exactly the same set of keywords as Lua and has the same other lexical conventions.</p> | 125 <p>Luan has exactly the same set of keywords as Lua and has the same other lexical conventions.</p> |
124 | 126 |
125 <h3 heading><a name="vars">Variables</a></h3> | 127 <h3 heading><a name="vars">Variables</a></h3> |
126 | 128 |
197 | 199 |
198 <h4 heading><a name="fn_calls">Function Calls</a></h4> | 200 <h4 heading><a name="fn_calls">Function Calls</a></h4> |
199 | 201 |
200 <p>Luan does not support Lua's <code>v:name(args)</code> style object-oriented function call. Object oriented programming is done in Luan using closures, so this feature is not needed.</p> | 202 <p>Luan does not support Lua's <code>v:name(args)</code> style object-oriented function call. Object oriented programming is done in Luan using closures, so this feature is not needed.</p> |
201 | 203 |
204 <p>Luan doesn't support <em>proper tail calls</em>. Because Java doesn't support this cleanly, this was left out.</p> | |
205 | |
202 <h4 heading><a name="template_expr">Template Expressions</a></h4> | 206 <h4 heading><a name="template_expr">Template Expressions</a></h4> |
203 | 207 |
204 <p>Template expressions are a Luan addition that don't exist in Lua. See <a href="manual.html#template_expr">Template Expressions</a> in the Luan Reference Manual.</p> | 208 <p>Template expressions are a Luan addition that don't exist in Lua. See <a href="manual.html#template_expr">Template Expressions</a> in the Luan Reference Manual.</p> |
205 | 209 |
206 </body> | 210 </body> |