TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

A Brief Introduction to Forth (1993)

62 pointsby Cieplakover 4 years ago

7 comments

howerjover 4 years ago
I love Forth, but for me it is not a viable programming language to do general purpose work in. It is not even particularly good in the niches it once served in either, such as in the embedded realm and memory constrained systems. Learning the language, and more importantly implementing my own Forth, has made me a better programmer, but I do not think I would ever use it professionally.<p>It is quite a poor language for modern software development. The advantages of Forth are nearly never useful to a modern application, mobile or web developer. The advantages are; works well on a memory constrained system (think kilobytes not megabytes), it is good for writing assemblers and cross compilers for Forth (I think we can agree that most developers are not going to be porting a programming language to a new architecture in order to write a CRUD application), and poking hardware and hardware registers interactively which goes without saying - the vast majority of programmers will never do, only embedded and kernel developers on any regular basis.<p>Instead it has many disadvantages like poor string handling, global state being the default and not the exception, poor support for structures (I know you can make your own but that does not make them good), and even worse memory safety than C. That is just that language itself, the ecosystem around it is just as bad, there are few libraries for generic functions, and it is most likely that they will require some kind of porting to the Forth you are using, there is a saying within the Forth community - &quot;If you have seen one Forth, you have seen one Forth&quot;, they are different in quite fundamental ways.<p>It just does not solve modern problems but ones that were relevant in the 1980s on microcomputers.<p>The reason I like Forth is because I like reinventing the wheel, understanding how systems are implemented, and puzzles. I do not like Forth because it is good at getting things done.
评论 #25752513 未加载
评论 #25747892 未加载
SulphurCrestedover 4 years ago
Those who want to read more might enjoy Leo Brodie&#x27;s book &quot;Starting FORTH&quot;, complete with hand-drawn illustrations and retro monospaced font. I never worked with the language, but found the book an enjoyable read in the 1980s when it came out, as much from seeing how he went about explaining things as from the things being explained.<p>Unfortunately my copy was eaten by a rat. But a scanned and OCRed version of that 1st edition is available as a PDF here:<p><a href="https:&#x2F;&#x2F;www.forth.com&#x2F;starting-forth&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.forth.com&#x2F;starting-forth&#x2F;</a>
mkovachover 4 years ago
Ahh Forth .. I remember after I finally got a disk drive for my TI-99&#x2F;4a, I ordered some software and they included TI Forth. This was around 1985 or so. In 1990 I ended up writing a small Forth kernel to run a micro-controller in one of my EE lab classes.<p>Teacher took away points not using assembly or C and because &quot;you shouldn&#x27;t be able to add code on the fly&quot;.<p>Still bugs me to this day.
评论 #25756067 未加载
smlckzover 4 years ago
And after forth, there&#x27;s Tcl. And lisp. These three are the most easily implementable, for which we have so many dialects of them. What other languages are so small, simple and easy to implement?
评论 #25745619 未加载
评论 #25746983 未加载
评论 #25747582 未加载
评论 #25746376 未加载
评论 #25745494 未加载
评论 #25746928 未加载
评论 #25747240 未加载
评论 #25746811 未加载
ihitnailsover 4 years ago
&quot;Winter is coming and Collapse OS aims to soften the blow. It is a Forth operating system and a collection of tools and documentation with a single purpose: preserve the ability to program microcontrollers through civilizational collapse.&quot;<p><a href="https:&#x2F;&#x2F;collapseos.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;collapseos.org&#x2F;</a>
mumblemumbleover 4 years ago
Factor might be a more interesting option than Forth nowadays.<p>It&#x27;s also a concatenative language, so it captures a lot of what&#x27;s interesting about Forth, but with more of the niceties that we&#x27;ve come to expect in a programming language.<p><a href="https:&#x2F;&#x2F;factorcode.org" rel="nofollow">https:&#x2F;&#x2F;factorcode.org</a>
amitprayalover 4 years ago
mecrisp a forth implementation for microcontrollers is very relevant