Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tutorial update str interpolation syntax #6429

Merged
merged 1 commit into from
Jan 26, 2024
Merged

Conversation

Anton-4
Copy link
Collaborator

@Anton-4 Anton-4 commented Jan 26, 2024

The tutorial was still using the deprecated string interpolation syntax.

@Anton-4 Anton-4 merged commit 1605679 into main Jan 26, 2024
17 checks passed
@Anton-4 Anton-4 deleted the tutorial-str-interpolation branch January 26, 2024 14:17
@bottlenecked
Copy link

If $(...) is the new string interpolation syntax, then I guess this part under the 'Friendly' page should be removed/changed?

https://www.roc-lang.org/friendly

"Name: \(Str.trim name)" uses string interpolation syntax: a backslash inside a string literal, followed by an expression in parentheses. This code is the same as combining the string "Name: " with the string returned by the function call Str.trim name.

Because Roc's string interpolation syntax begins with a backslash (just like other backlash-escapes such as \n and "), you can always tell which parts of a string involve special handling: the parts that begin with backslashes. Everything else works as normal.

@Anton-4
Copy link
Collaborator Author

Anton-4 commented Feb 2, 2024

Thanks for letting us know @bottlenecked, this is fixed in #6488

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants