
Backtick Macro Processor for Forth - eatonphil
https://rdrop-exit.github.io/backtick-macro-processor/
======
evincarofautumn
Nice to see more interest in Forths and concatenative languages lately on HN.
IMO they’re even more amenable to metaprogramming than Lisps, and there’s a
lot of power in a compositional, interactive style of programming, especially
for a low-level language with no safety nets. I definitely recommend playing
around with a Forth (I like Gforth) or Factor, and trying to absorb some of
the philosophy—it’s helped improve my program design in other languages.

~~~
notduncansmith
Speaking of concatenative languages, Joy and K (and I suppose J) should get
mentioned as well. Lots of wisdom to be drawn from those languages and the
minds behind them, and especially interesting when examined in tandem with
Lisps and various functional programming languages.

~~~
boomlinde
I don't think that K and J belong in that category of languages. While they
both also welcome a point-free style of programming, an important
characteristic of concatenative languages is that (almost) any sequence of
tokens is a valid sub-program, making it very easy and natural to factor and
compose programs from smaller programs.

In Forth, if you figure that a sequence of 5 tokens are used often, you don't
consider what parameters are used and name them in a function definition. You
rip those 5 tokens out verbatim into a word definition, which when called
pulls them implicitly off the stack just as if the tokens were in-line.

~~~
notduncansmith
You're absolutely right, thanks for correcting my mistake. I think my brain
lazily threw them in there because I learned about them all around the same
time. Also, I came across this fascinating directory of links a while back,
some of which explore the overlap further: [http://nsl.com](http://nsl.com)

