blob: fe1fd75a99890c6a1cd2765c66e0f02a4ed29d65 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
<h2>toc</h2>
<p><code>toc</code> is a language which compiles to C.</p>
<hr />
<h3>About</h3>
<p><code>toc</code> is currently in development. <strong>It is not a stable language,
and there are almost definitely bugs right now.</strong>
I would recommend against using it for anything big or important.
Many parts of it may change in the future.</p>
<p><code>toc</code> improves on C's syntax (and semantics) in many ways,
To declare <code>x</code> as an integer and set it to 5,
you can do:</p>
<p><code>
x := 5; // Declare x and set x to 5 (infer type) <br />
x : int = 5; // Explicitly make the type int. <br />
x : int; x = 5; // Declare x as an integer, then set it to 5.
</code></p>
<p><code>toc</code> is statically typed and has many of C's features, but
it is nearly as fast in theory.</p>
<p>See <code>docs</code> for more information (in progress).</p>
<p><code>tests</code> has some test programs written in <code>toc</code>.</p>
<p>To compile the compiler on a Unix-y system, use</p>
|