Skip to content
This repository has been archived by the owner on Aug 8, 2024. It is now read-only.

Commit

Permalink
Deployed 0cf072e with MkDocs version: 1.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
lerno committed Dec 7, 2023
1 parent 4acd5ed commit fa4c251
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 49 deletions.
21 changes: 21 additions & 0 deletions faq/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,27 @@ <h2 id="patterns">Patterns</h2>
The method <code>free</code> will free all memory associated with a type. <code>destroy</code> is similar to <code>free</code> but also indicates
that other resources (such as file handles) are released. In some cases <code>close</code> is used instead of <code>destroy</code>.</p>
<p>Function and variable names use <code>snake_case</code> (all lower case with <code>_</code> separating words).</p>
<p><strong>Q:</strong> How do I create overloaded methods?</p>
<p><strong>A:</strong> This can be achieved with macro methods.</p>
<p>Imagine you have two methods:</p>
<pre><code>fn void Obj.func1(&amp;self, String... args) @private {} // varargs variant
fn void Obj.func2(&amp;self, Foo* pf) @private {} // Foo pointer variant
</code></pre>
<p>We can now create a macro method on <code>Obj</code> which compiles to different calls depending on arguments:</p>
<pre><code>// The macro must be vararg, since the functions take different amount of arguments
macro void Obj.func(&amp;self, ...)
{
// Does it have a single argument of type 'Foo*'?
$if $vacount == 1 &amp;&amp; @typeis($vaarg(0), Foo*):
// If so, dispatch to func2
return self.func2($vaarg(0));
$else
// Otherwise, dispatch all varargs to func1
return self.func1($vasplat());
$endif
}
</code></pre>
<p>The above would make it possible to use both <code>obj.func("Abc", "Def")</code> and <code>obj.func(&amp;my_foo)</code>.</p>
<h2 id="syntax-language-design">Syntax &amp; Language design</h2>
<p><strong>Q:</strong> Why does C3 require that types start with upper case but functions with lower case?</p>
<p><strong>A:</strong> C grammar is ambiguous. Usually compilers implement either the so-called lexer hack, but other methods
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -299,5 +299,5 @@ <h4 id="thank-yous">Thank yous</h4>

<!--
MkDocs version : 1.1.2
Build Date UTC : 2023-12-05 13:29:25.269490+00:00
Build Date UTC : 2023-12-07 19:48:35.974449+00:00
-->
2 changes: 1 addition & 1 deletion search/search_index.json

Large diffs are not rendered by default.

94 changes: 47 additions & 47 deletions sitemap.xml
Original file line number Diff line number Diff line change
@@ -1,191 +1,191 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><url>
<loc>None</loc>
<lastmod>2023-12-05</lastmod>
<lastmod>2023-12-07</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2023-12-05</lastmod>
<lastmod>2023-12-07</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2023-12-05</lastmod>
<lastmod>2023-12-07</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2023-12-05</lastmod>
<lastmod>2023-12-07</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2023-12-05</lastmod>
<lastmod>2023-12-07</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2023-12-05</lastmod>
<lastmod>2023-12-07</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2023-12-05</lastmod>
<lastmod>2023-12-07</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2023-12-05</lastmod>
<lastmod>2023-12-07</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2023-12-05</lastmod>
<lastmod>2023-12-07</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2023-12-05</lastmod>
<lastmod>2023-12-07</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2023-12-05</lastmod>
<lastmod>2023-12-07</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2023-12-05</lastmod>
<lastmod>2023-12-07</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2023-12-05</lastmod>
<lastmod>2023-12-07</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2023-12-05</lastmod>
<lastmod>2023-12-07</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2023-12-05</lastmod>
<lastmod>2023-12-07</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2023-12-05</lastmod>
<lastmod>2023-12-07</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2023-12-05</lastmod>
<lastmod>2023-12-07</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2023-12-05</lastmod>
<lastmod>2023-12-07</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2023-12-05</lastmod>
<lastmod>2023-12-07</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2023-12-05</lastmod>
<lastmod>2023-12-07</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2023-12-05</lastmod>
<lastmod>2023-12-07</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2023-12-05</lastmod>
<lastmod>2023-12-07</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2023-12-05</lastmod>
<lastmod>2023-12-07</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2023-12-05</lastmod>
<lastmod>2023-12-07</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2023-12-05</lastmod>
<lastmod>2023-12-07</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2023-12-05</lastmod>
<lastmod>2023-12-07</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2023-12-05</lastmod>
<lastmod>2023-12-07</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2023-12-05</lastmod>
<lastmod>2023-12-07</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2023-12-05</lastmod>
<lastmod>2023-12-07</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2023-12-05</lastmod>
<lastmod>2023-12-07</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2023-12-05</lastmod>
<lastmod>2023-12-07</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2023-12-05</lastmod>
<lastmod>2023-12-07</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2023-12-05</lastmod>
<lastmod>2023-12-07</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2023-12-05</lastmod>
<lastmod>2023-12-07</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2023-12-05</lastmod>
<lastmod>2023-12-07</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2023-12-05</lastmod>
<lastmod>2023-12-07</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2023-12-05</lastmod>
<lastmod>2023-12-07</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2023-12-05</lastmod>
<lastmod>2023-12-07</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2023-12-05</lastmod>
<lastmod>2023-12-07</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2023-12-05</lastmod>
<lastmod>2023-12-07</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2023-12-05</lastmod>
<lastmod>2023-12-07</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2023-12-05</lastmod>
<lastmod>2023-12-07</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2023-12-05</lastmod>
<lastmod>2023-12-07</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2023-12-05</lastmod>
<lastmod>2023-12-07</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2023-12-05</lastmod>
<lastmod>2023-12-07</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2023-12-05</lastmod>
<lastmod>2023-12-07</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2023-12-05</lastmod>
<lastmod>2023-12-07</lastmod>
<changefreq>daily</changefreq>
</url>
</urlset>
Binary file modified sitemap.xml.gz
Binary file not shown.

0 comments on commit fa4c251

Please sign in to comment.