4 ms·
In order to be able to read it, you have to know by heart the signature of the standard operators Unfortunately, while that tells you how many operands there a
by kazinator 10y ago
In order to be able to read it, you have to know by heart the signature of the standard operators
Unfortunately, while that tells you how many operands there are, it doesn't help you find them in the surrounding syntax.
In Forth, for instance, the operands of a + could be a pair of immediately preceding constants like 1 2 +. These could be far away in a contrived way: 1 2 [... snip stuff that produces side effects and keeps stack balanced ...] +. Or just due to expression complexity: [30 word expr] [27 word expr] +: the left operand of + is the result of the 30 word expr, which is 27 words away from the + symbol. Or is that 26? 29?
- nine_k 10y agoThe 30-word expr should have been another word, or two.
- mrkgnao 10y agoSo German trennbare Verben (split verbs)? :) Whenever the literary German dives into a sentence, that is the last you are going to see of him till he emerges on the other side of his Atlantic with his verb in his mouth. - Mark Twain
- astrobe_ 10y ago> These could be far away in a contrived way: 1 2 [... snip stuff that produces side effects and keeps stack balanced ...] + This is obviously poorly written. "1 2 + [stuff]" is the sane way to write it. Or "2 [stuff] 1 +" if [stuff] takes one parameter and outputs one result. > Or just due to expression complexity: [30 word expr] [27 word expr] + Post that on comp.lang.forth, and people will certainly tell you "don't do that" or "why do you that" if it's less trivial than a factoring issue. In similar situations some people have this trick of separating sub-expressions with double spaces. But that's ignoring the writing on the wall. What I learned from Forth is that it's true that it has its shortcomings, but I have my own shortcomings too. As Forth is a DIY language, you have to make this distinction in order to improve language/programmer pair.
- kazinator 10y agoThis is obviously poorly written. It's only obvious in the example form which I have. If such a thing occurs in real code, the stuff won't look like [stuff]; it will not stand out. "Poorly written" happens.