4 ms·
The designer has a stange aesthetics for those {} (function body) and ;; (block terminator), is there a FAQ? Update: This may be the best answer... http://eige
by voaie 11y ago
The designer has a stange aesthetics for those {} (function body) and ;; (block terminator), is there a FAQ?
Update: This may be the best answer...
http://eigenstate.org/myrddin/lang-checklist http://eigenstate.org/myrddin/lang-checklist
- ori_b 11y agoIt makes closures relatively clean, since the syntax is usable directly as an initializer for constants. var f = {arg body } const main = { g({arg; body}) }
- akavi 11y agoYay! I have an irrational love of this sort of thing; I enjoy the reinforcement of the idea that functions are just another kind of value. It seems like there really aren't that many languages with this symmetry (most lisps, JS/CS, Haskell, ...?), which I find a little strange.
- voaie 11y agoSo a semicolon plays three roles in the code (arg; statement; block;;), and it seems that ;; has higher precedence when ;;; is seen.
- ori_b 11y agoSort of. Endlines have one role: They end statements, although there are potentially many kinds of statement that they end. ';' and '\n' are alternative equivalent renderings of line endings. ';;' ends blocks. And yes, the lexer does the usual longest prefix match.