There is no type checking, no scope, and no separation of data and code. It’s a fun language to write a hardware abstraction layer in.īut Forth is also like a high-wire act if C gives you enough rope to hang yourself, Forth is a flamethrower crawling with cobras. ![]() In my opinion, this combination of live coding and proximity to the hardware makes Forth great for exploring new microcontrollers or working them into your projects. You can, and must, peek and poke directly into memory in Forth, but you can also build up a body of higher-level code fast enough that you won’t mind. Is it a high-level language or a low-level language? Yes! Or rather, it’s the shortest path from one to the other. From Thinking FORTH (PDF)įorth is what you’d get if Python slept with Assembly Language: interactive, expressive, and without syntactical baggage, but still very close to the metal. When your Forth code is right, it reads just like a natural-language sentence but getting there involves a bit of puzzle solving. And all of this is simple enough that it’s easily capable of running in a few kilobytes of memory. Forth is a virtual machine, an interpreted command-line, and a compiler all in one. Coding in Forth is a little bit like writing assembly language, interactively, for a strange CPU architecture that doesn’t exist. Let’s start right off with a controversial claim: Forth is the hacker’s programming language.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |