by sn41 · 5y ago · 0 comments
The main feature of the Forth style is to write lots of 1 to 2 line functions, in such a way that at the high-level, you have essentially a domain-specific language that looks like exactly what you want a program to look like - for example, "RINSE WASH CYCLE SPIN STOP" for a washing machine program, and "RINSE WASH RINSE WASH CYCLE SPIN STOP" for an extra clean option.
People claim that once you learn Forth, you start programming Forth-style in other languages like C, Python etc. I can already see the appeal.
My C sometimes looks like Lispy Erlangish weirdness, and my Java often looks like my C. Certain languages just have certain ways of worming their way into your brain and improving the way you think, much to the dismay of everyone who can't think that way yet because the idiom isn't native to that language (yet).
One of the most rewarding training experiences was giving my old Haskell textbook to a junior team member and watching his (at the time .NET, w/LINQ) code change over the course of a few weekends.
For example I am writing functions with no (or less) mutation and keeping them pure. Makes for easy testing.
We have Ruby programmers who has never used map/fold etc.
Sounds very much like my experience with LISPs. Probably just need to dive in and try it. Thanks for the detailed response.