3 ms·
For a language optimized for pen and paper, `z.@re` seems verbose, when one could use either `z.re` or `z@re` to describe member access. I notice that later on
by samatman 7y ago
For a language optimized for pen and paper, `z.@re` seems verbose, when one could use either `z.re` or `z@re` to describe member access. I notice that later on the page he drops into the more obvious notation l.next for a linked list member.
This one may be cultural, but when I write math (including pseudocode), I use × rather than ⋅ for ordinary multiplication. This is 100% a matter of habit, but also it's too easy to mix up ⋅ and ., at least in my handwriting. Dot product I write with a small open circle, ∘.
The ← for assignment is good, but I wish it was used consistently; elsewhere we see =, and then == for equals, which is totally unnecessary in handwriting if one has adopted a distinct symbol for assignment. ↑ for returns is alright though I'd probably write it →, but this is a minor aesthetic judgement call: I like the symmetry that i ← double(x) could expand to i ← (λ(x) → x × x)(x).
The actual meat of the article, starting with loops and conditionals, is good stuff. I wouldn't understand it if I just saw it written out, but it beats the pants off UML-like bubble diagrams, and I don't expect it would take much exposure to render it familiar.
- kragen 7y agoI'm glad to hear your thoughts! I have a great deal of respect for your technical judgment. There are definitely errors in there. Some are inconsistencies as I experimented over time. However, the distinction intended to be expressed by =/← is the distinction between initialization and mutation. I might have gotten it wrong sometimes. In the case of UML-like bubble diagrams, have you looked at Alloy?
- samatman 7y agoAha, that makes sense (the initialization and mutation, that is). It probably won't surprise you to know that I would scribble a := there; `==` is one of my least favorite of the tokens we've inflicted upon ourselves as a profession. Certainly it's good to draw the distinction between initialization and mutation. Although as an immutable initialization, `=` is correct as an equation as well... hmm. I wasn't familiar with Alloy, but I'm about to be. I've clobbered a few things together with PlantUML, and don't have any use for a diagramming system that doesn't have a canonical textual representation, which it appears Alloy does... it appears Alloy does rather a lot, actually. My goodness. This thing has a SAT solver strapped to the side of it. I did not see that coming.