String Interpolation in string literals

I made my first ever package in Racket. It adds string interpolation to string literals.

For example:

(define (greet name) "Hello @{name}")
(greet "Racket")

Result: "Hello Racket"

12 Likes

This is very cool. String interpolation is something I've delighted in from other languages and I've used some workarounds in Racket to get similar effects. Nice to have an actual package for it.

2 Likes