on 2fcd64d help sign in
urbit.org/docs/hoon_javascript_analogies.md
51 lines 1.3 kB history raw
1## Hoon/Javascript Analogies
3Below find a table of analogies between Hoon and Javascript terms that may be useful for learners. Note that these correspondences are mostly inexact and should serve only as guideposts on the path to
4comprehending Hoon on its own terms.
6<table>
7 <tr>
8 <td><strong>Hoon Term</strong></td>
9 <td><strong>Javascript Term</strong></td>
10 </tr>
11 <tr>
12 <td>core</td>
13 <td>the Map object</td>
14 </tr>
15 <tr>
16 <td>arm</td>
17 <td>a key-value pair in the Map object</td>
18 </tr>
19 <tr>
20 <td>"formula"</td>
21 <td>function invocation</td>
22 </tr>
23 <tr>
24 <td>"subject"</td>
25 <td>the invoked function and its scope</td>
26 </tr>
27 <tr>
28 <td>=< ('tisgal')</td>
29 <td>takes two children</td>
30 </tr>
31 <tr>
32 <td>|= ('bartis')</td>
33 <td>function</td>
34 </tr>
35 <tr>
36 <td>=| ('tisbar')</td>
37 <td>declare a variable</td>
38 </tr>
39 <tr>
40 <td>|- ('barhep')</td>
41 <td>initialize a loop</td>
42 </tr>
43 <tr>
44 <td>?: ('wutcol')</td>
45 <td>initialize <strong>if</strong> statement</td>
46 </tr>
47 <tr>
48 <td>:- ('colhep')</td>
49 <td>somewhat similar to the "return" keyword in a much expanded form</td>
50 </tr>
51<table>