3 ms·
I haven't done much with Forth, so take this with a grain of salt. Most corporate software development uses languages like Java, C#, Ruby, and Python that are
by csande17 4y ago
I haven't done much with Forth, so take this with a grain of salt.
Most corporate software development uses languages like Java, C#, Ruby, and Python that are all very similar to one another. Sure, some of them use different punctuation, but the basic tools you use to solve problems all involve putting pretty much the same words in pretty much the same order. It's easy for someone with one language to quickly pick up another.
Forth's syntax immediately pushes it into the "weird languages" category because almost all of the words are in a different order. "1 + 1" is now "1 1 +". That sets it far enough apart from Python/Ruby/Java/etc that a tech company isn't going to use it unless they feel really strongly about it. (AFAIK there isn't any big corporate push for Forth like there is for Go and Rust and stuff.)
The main audience for Forth is therefore hobbyists. I think the main reason why you see lots of handmade Forth implementations is because Forth is really easy to implement. It's a fun hobby project. And because Forth is simple, its community biases towards people who like writing simple software. If you want to write complex software in a weird language, you'll probably gravitate towards a complex language like Haskell or something.
- shagie 4y agoThat 1 1 + isn't too different (to me) from (+ 1 1) which has a different sort of beauty to it. Incidentally, the oldest surviving language on a unix system uses this syntax (and predates C): https://en.wikipedia.org/wiki/Dc_(computer_program) https://en.wikipedia.org/wiki/Dc_(computer_program) http://webarchive.loc.gov/all/20100506231949/http://cm.bell-labs.com/cm/cs/who/dmr/hist.html http://webarchive.loc.gov/all/20100506231949/http://cm.bell-... > When the PDP-11 arrived, B was moved to it almost immediately. In fact, a version of the multi-precision `desk calculator' program dc was one of the earliest programs to run on the PDP-11, well before the disk arrived. However, B did not take over instantly. Only passing thought was given to rewriting the operating system in B rather than assembler, and the same was true of most of the utilities. Even the assembler was rewritten in assembler. This approach was taken mainly because of the slowness of the interpretive code. Of smaller but still real importance was the mismatch of the word-oriented B language with the byte-addressed PDP-11. The main advantage of Forth is that it can be put in some very small places and run impressively fast. http://www.ultratechnology.com/chips.htm http://www.ultratechnology.com/chips.htm https://en.wikichip.org/wiki/novix/nc4016 https://en.wikichip.org/wiki/novix/nc4016 > NC4016 (formerly NC4000) was a 16-bit stack machine microprocessor designed by Novix in 1985 primarily for the Forth programming language. The NC4016 directly executes the primitives of the high-level Forth programming language. The NC4016 was capable of executing typical Forth programs as much as 20 times faster than the Motorola 68000. Novix also offered the NC4000 Small C Compiler which was compatible with the NC4016 microprocessor. > In 1988, the NC4016 design was licensed and improved by Harris Semiconductor which later rebranded the chip as the RTX2000, a radiation hardened version suitable for spacecrafts use. https://en.wikipedia.org/wiki/RTX2010 https://en.wikipedia.org/wiki/RTX2010 ( https://news.ycombinator.com/item?id=8611274 https://news.ycombinator.com/item?id=8611274 ) > The RTX2010, manufactured by Intersil, is a radiation hardened stack machine microprocessor which has been used in numerous spacecraft.
- stevekemp 4y agoAnother reason why there are so many handmade Forth implementations is because it is almost more educational and rewarding to write a forth than it is to use one. (For the reasons explored already upthread.) I like forth, I've implemented two, and yet the most I've done with it is write toy programs, and use it to script a host program a few times.