logiqub | 4 months ago | on: Forth – Is it still relevant?
logiqub's comments
logiqub | 4 months ago | on: Forth – Is it still relevant?
My website has been down for a while, but there are still some snapshots of my previous work. I didn't want to upload to GitHub and be pressured by users, when my design isn't polished yet.
https://web.archive.org/web/20220818170224/http://logiqub.co... https://web.archive.org/web/20240226001954/http://logiqub.co...
logiqub | 4 months ago | on: Forth – Is it still relevant?
But the problem with Forth is that it's an evolving language. You design the language to describe your problem. As a result you need to be a good enough programmer to design a programming language, and make use of Forth's strengths. The other problem is the lack of object oriented features, if they are needed for your project. Because you invent the features as you go, and because you are free to redefine keywords, the final language might be anything. The lack of standardization hurts when it comes down to working on a large team.
The biggest problem however, is that you need to discard everything you thought you knew about programming to really do Forth. Real Forth does away with the abstractions common in mainstream languages. Forth is small, fast, portable.
I am now working on building my own game engine to prove that Forth is the "ultimate" language (for my needs). Imagine not having to read "The dragon book" to make your own compiler, that's a game changer. And let's not forget we are in the age of "IOT". Changing the syntax on the fly, not having to deal with a compiler that insults (looking at you C++), it's a pleasure.
I rewrote my compiler at least 20 times, and I took no shortcut. C was never used, it's just assembly code, and then adding features, based on a solid core. My own innovation is dot notation because I need objects, hooks in the compiler, so you can compiler alter the parser, error handler, etc. if needed.
In the future I will release the new virtual machine, with a few applications, and build a game library over time. If lucky, I may fund my retirement. We will see how it goes.
Now, can it be done productively ? Is the 10x claim verifiable ? That depends on your skill. Maybe it's not for everyone's taste. If you prefer to let the compiler do the compiling for you, maybe not. But that being said, Forth makes you more productive because it allows you to change the problem. Modern environments are bloated and waste so many resources. Libraries are huge, software is huge.
One user only require 10% of the functionality, yet you pay for all this fat. When you do real Forth, you do away with the unnecessary... to the extreme. You also change the compiler and the syntax, when it doesn't map to the problem you are solving. With Forth, you can change the problem. Other programming languages can't do that.