Stream: announcements

Topic: string interpolation syntax `\(varname)`


view this post on Zulip Anton (Oct 09 2024 at 12:39):

With today's nightly, the previously deprecated string interpolation syntax, for example"val: \(varname)", got removed. Use "val: $(varname)" instead.

For future searches; this is the error you will get now:

── WEIRD ESCAPE in build.roc ───────────────────────────────────────────────────

I was partway through parsing a  string literal, but I got stuck here:

144│              info! "Failed to get env var CARGO_BUILD_TARGET with error \(Inspect.toStr e). Assuming default CARGO_BUILD_TARGET (native)..."
                                                                             ^^

This is not an escape sequence I recognize. After a backslash, I am
looking for one of these:

    - A newline: \n
    - A caret return: \r
    - A tab: \t
    - An escaped quote: \"
    - An escaped backslash: \\
    - A unicode code point: \u(00FF)

view this post on Zulip Luke Boswell (Oct 09 2024 at 21:50):

Thanks to @Hrishikesh Dharam for working on this :smiley:


Last updated: Jul 26 2025 at 12:14 UTC