4 ms·
As a reasonably fluent Forth programmer, I find the comparisons to Forth a source of confusion, at best. In Forth a compiled word definition begins with : and
by RodgerTheGreat 6y ago
As a reasonably fluent Forth programmer, I find the comparisons to Forth a source of confusion, at best.
In Forth a compiled word definition begins with : and ends in ; while Play definitions begin at :def, use : to separate signatures from word bodies, and appear to be implicitly terminated wherever the next definition begins. Forth definitions always appear in "reading order"- words are declared before they are used- but the very first example on the Play home page inverts this convention. It feels rather like reading pig-latin, or perhaps ML wearing a Forth-skin-suit.
Forth's hybrid compiled/interpreted nature is at the heart of its expressiveness; so far as I can tell, this is entirely absent from Play. How would I define a word like "when:", "def:", or "["?
In my opinion it would be clearer and more accurate to describe Play as simply a concatenative functional language.
- Skinney 6y agoI see your point, but in my experience way more people have heard of Forth than "concatinative language", and of those that have heard of Forth most associate it with stack oriented programming, which is at the heart of Play. Forth also did serve as the true inspiration for Play, so it makes sense to me to put that front and center.
- dkersten 6y agoSomething like "Forth-inspired concatenative language" might be clearer.
- RodgerTheGreat 6y agoPerhaps you can elaborate, then: With the exception of a whitespace-delimited tokenization rule for the syntax and an implicit parameter stack for composing words, what else about Play would you say is inspired by Forth?
- Skinney 6y agoTo me, that is Forth.