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.

Thinking Forth

81 pointsby aycangulezover 13 years ago

9 comments

RodgerTheGreatover 13 years ago
Thinking Forth is a wonderful book- even if you don't see yourself writing applications in Forth, it contains many insights that can be applied to programming in any language. As it turns out, Forth is a particularly good language for illustrating architectural tradeoffs because you can demonstrate ideas like factoring and API design with extremely short pieces of (idiomatic!) example code.<p>If I had an opportunity to teach an introductory software engineering course, I would strongly consider using Thinking Forth as a textbook.
gruseomover 13 years ago
Here is a gem from this gem of a book - surely one of the best descriptions ever of what are now called DSLs:<p><i>Forth programming consists of extending the root language toward the application, providing new commands that can be used to describe the problem at hand. Programming languages designed especially for particular applications such as robotics, inventory control, statistics, etc., are known as “application-oriented languages.” Forth is a programming environment for creating application-oriented languages. (That last sentence may be the most succinct description of Forth that you’ll find.) In fact, you shouldn’t write any serious application in Forth; as a language it’s simply not powerful enough. What you should do is write your own language in Forth (lexicons) to model your understanding of the problem, in which you can elegantly describe its solution.</i>
评论 #3390004 未加载
agumonkeyover 13 years ago
Already mentioned on this site, but still good to advertise from time to time.<p><a href="http://www.hnsearch.com/search#request/all&#38;q=thinking+forth&#38;start=20" rel="nofollow">http://www.hnsearch.com/search#request/all&#38;q=thinking+fo...</a><p>checkout also <a href="http://factorcode.org/" rel="nofollow">http://factorcode.org/</a> a forth-like system with batteries. (already mentioned here too)
评论 #3389563 未加载
KaeseEsover 13 years ago
While Forth is certainly a mind-expanding experience, I still feel that it suffers a bit from "Stackholm syndrome" when I see advice like that contained on page 144, under the section "An alternative to screens: source in named files":<p><pre><code> Infnite-length files allow sloppy, disorganized thinking and bad factoring. Defnitions become longer without the discipline imposed by the 1K block boundaries. The tendency becomes to write a 20K file, or worse: a 20K definition.</code></pre>
评论 #3390148 未加载
raymondhover 13 years ago
I've long been a big fan of this book. It will make you a better programmer even if you don't program in Forth.<p>The only downside is that it will feel dated (because it is). Many of the ideas that were once progressive, original, and a bit revolutionary now seem obvious and a little trite.
kolevover 13 years ago
Forth is a beautiful language. Just like Lisp, Smalltalk, and others have a comeback, I won't be surprised if the same happens soon with Forth as well.
kephraover 13 years ago
One of the best books ever!<p>An eye opener next to 'a little Smalltalk'
resnamenover 13 years ago
This really takes me back to my RPL days on my old HP-48G.
calcnerd256over 13 years ago
typo on page 3: "Move the contents or Register B to Register A,"<p>s/r/f/ that string