the current nightly now includes the new string interpolation syntax discussed in #ideas > string interpolation syntax! It works the same way as before, except instead of \(…)
it's now $(…)
For now, the previous syntax is still supported, and roc format
will preserve whichever one you use, so this change is currently backwards-compatible. At some point in the future, roc format
will automatically change the previous syntax to the new syntax, and eventually support previous syntax will be removed.
Ivan's VS Code extension supports the new syntax, including syntax highlighting for expressions inside the $(…)
! :smiley:
Screenshot-2024-01-08-at-7.34.36-AM.png
The deprecated syntax is still present in the first example on the website, if you're making a list of places to update! I'd make a PR but haven't got set up fully yet :grinning:
Screen-Shot-2024-01-08-at-3.26.16-PM.png
Thanks for letting us now @Drew Lazzeri :)
I have a fix up in PR#6369
Last updated: Jul 26 2025 at 12:14 UTC