News for hackers. Stuff that matters.
Re:Meta-syntactic programming with Racket: string interpolation by moron4hire on Tuesday May 02, 2017 @08:57AM (#14245945)
I thought that part was clear, that it was pedagogical example more than a useful one.

But to anyone who still doesn't get it and might be thinking the fact that Racket lacking such a feature is evidence that it's a less well-developed language than others, the reason Racket doesn't have string interpolation is because it's not really needed. If you're going to do large amounts of string templating, the "Racket Way" is to use Scribble: https://docs.racket-lang.org/scribble/index.html

Scribble is basically Literate Racket. And it's able to generate a very wide variety of document formats, far more than I've ever seen any documentation or string templating tool do.

There is also quasi-quoting and un-quoting, for doing a very similar thing with Symbols: https://docs.racket-lang.org/reference/quasiquote.html

There are no comments on this comment yet.