3 ms·
> 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.
by 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.