on master help sign in
draft of hoon javascript analogies list
commitd221d2c0035c047915171ddd42638f003d94111d authorChristopher King <chris@arcturustech.com> dateTue 20 Jun 2017, 21:22 (9 years ago) parent851d3db
1 file changed+64
docs/hoon_javascript_analogies.md+64
docs/hoon_javascript_analogies.mdnew file+64
@@ -0,0 +1,64 @@
1+## Hoon/Javascript Analogies
2+
3+Below 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
4+comprehending Hoon on its own terms.
5+
6+|Hoon Term |Javascript Term |
7+|--------------|----------------------------------------------------------------------------------------------------------------------------------------------|
8+|core |the Map object |
9+|arm |a key-value pair in the Map object |
10+|"formula" |function invocation |
11+|"subject" |the invoked function and its scope |
12+|=< ('tisgal') |takes two children, a function invocation as well as the invoked function and its scope (the Hoon terms "formula" and "subject" defined above)|
13+||= ('bartis') |function |
14+|=| ('tisbar') |declare a variable |
15+||- ('barhep') |initialize a loop |
16+|?: ('wutcol') |initialize if statement |
17+|:- ('colhep') |somewhat similar to the "return" keyword in a much expanded form |
18+
19+<table>
20+ <tr>
21+ <td><strong>Hoon Term</strong></td>
22+ <td><strong>Javascript Term</strong></td>
23+ </tr>
24+ <tr>
25+ <td>core</td>
26+ <td>the Map object</td>
27+ </tr>
28+ <tr>
29+ <td>arm</td>
30+ <td>a key-value pair in the Map object</td>
31+ </tr>
32+ <tr>
33+ <td>"formula"</td>
34+ <td>function invocation</td>
35+ </tr>
36+ <tr>
37+ <td>"subject"</td>
38+ <td>the invoked function and its scope</td>
39+ </tr>
40+ <tr>
41+ <td>=< ('tisgal')</td>
42+ <td>takes two children, a function invocation as well as the invoked function and its scope (the Hoon terms "formula" and "subject" defined above)</td>
43+ </tr>
44+ <tr>
45+ <td>|= ('bartis')</td>
46+ <td>function</td>
47+ </tr>
48+ <tr>
49+ <td>=| ('tisbar')</td>
50+ <td>declare a variable</td>
51+ </tr>
52+ <tr>
53+ <td>|- ('barhep')</td>
54+ <td>initialize a loop</td>
55+ </tr>
56+ <tr>
57+ <td>?: ('wutcol')</td>
58+ <td>initialize <strong>if</strong> statement</td>
59+ </tr>
60+ <tr>
61+ <td>:- ('colhep')</td>
62+ <td>somewhat similar to the "return" keyword in a much expanded form</td>
63+ </tr>
64+<table>