3 ms·
Honestly I think that for many, Forth may be a bit too much of a green field to build upon. Out of the box, out of the standard, there no real structured data
by whartung 4y ago
Honestly I think that for many, Forth may be a bit too much of a green field to build upon.
Out of the box, out of the standard, there no real structured data type ala records, there's no strings, there's no modular coding construct. All of those can be added, but that's the trick. They have to be added. You also start getting into implementation specific stuff that, potentially, makes that kind of infrastructure not portable across implementations.
Not that portability is a huge concern, but it's a factor if you want to import someone else's implementation.
All of that can be overcome, but that they have to be overcome is part of the problem. Original scheme suffered from this as well, but look how far it's come over time. To the point that all "usable" schemes aren't really the 50 page R5RS versions anymore.
It also doesn't help that Forth niched its way into controllers and smaller systems. Forth had all of the availability advantages early on, perhaps even more so, than C, Pascal, etc. But, organically, Forth never caught on.
It's fair to say that Lisp suffered "not enough computer" issues early on to hinder adoption, but that's long past. But Lisp still suffers adoption, when pretty much every complaint about it is long buried -- save its syntax.
And I just think folks, again, organically, "wisdom of the crowds" don't like S-Exprs for code. They just don't like it. It's off-putting enough that folks look elsewhere.
Forth, in the end, suffers similarly. All of these demos and mini DSL examples look great. But they're contrived. Take a look at any Forth code you can find and see if you can make sense of it. Especially "modern" code, where we "know better" and aren't constrained by file size, or line size, or "screens" or "blocks".
Take a look at that Zen's github.
And try to make sense of it.
This is all barrier to entry, and most aren't willing to climb over it.
- throwaway17_17 4y agoI hate that I think you are probably correct. I especially think you hit a strong line of thought with the portions of Forth’s aesthetic and idioms that are very much a product of hyper constrained resources from the time period of its release. The issue of lack of standard library is a part of that time period effect as well, I think any new language has to come with some basics in 2022 which would have been extravagant prior to 1975 (maybe even later if C is any guide). I really am drawn to a Forth—esque syntax, but i think that has more to do with the type theoretical and categorical semantics of my language and it’s projectional properties than simple appearance. Fortunately I don’t think I am ever going to release it, so I don’t have to worry about general acceptance.
- Karrot_Kream 4y agoSlight correction, FORTH-79 does indeed have first class string support. Forth strings are generally tuples of the form (start address, length) which are placed on the stack after definition.
- veltas 4y ago> Out of the box, out of the standard, there no real structured data type ala records, there's no strings, there's no modular coding construct. All of those can be added, but that's the trick. They have to be added. There are structures, strings, etc in standard forth. And if you're using an older forth without structures here is a structures library in 2 lines: : +FIELD OVER + SWAP CREATE , DOES> @ + ; : FIELD: ALIGNED 1 CELLS +FIELD ; Usage: \ Shape struct 0 FIELD: SHAPE.WIDTH FIELD: SHAPE.HEIGHT FIELD: SHAPE.AREA CONSTANT %SHAPE \ Example shape CREATE SQUARE 1 , 1 , 1 , \ Get height SQUARE SHAPE.HEIGHT ? \ Get area SQUARE SHAPE.AREA ? \ Set width 2 SQUARE SHAPE.WIDTH ! 2 SQUARE SHAPE.AREA !
- cardanome 4y agoI think factor https://www.factorcode.org/ https://www.factorcode.org/ fills in the need for a batteries-included and higher-level abstractions-provided stack-based language quite well. While the language is not exactly popular right now, I think they are on the right track on what a modern stack-based language should look like.
- MaxBarraclough 4y ago> Out of the box, out of the standard, there no real structured data type ala records, there's no strings, there's no modular coding construct ANS Forth (the somewhat controversial Forth standard) does have strings. ANS Forth also has structures (records). I see gforth also has its own alternative. [0][1] I believe you're right that ANS Forth has nothing akin to namespaces or modules. [0] https://www.complang.tuwien.ac.at/forth/gforth/Docs-html/Forth200x-Structures.html#Forth200x-Structures https://www.complang.tuwien.ac.at/forth/gforth/Docs-html/For... [1] https://www.complang.tuwien.ac.at/forth/gforth/Docs-html/Structure-Usage.html#Structure-Usage https://www.complang.tuwien.ac.at/forth/gforth/Docs-html/Str...