-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Design idea: string interpolation #2005
Copy link
Copy link
Open
Labels
design ideaAn issue recording a specific language design idea that folks can potentially pick up.An issue recording a specific language design idea that folks can potentially pick up.long term issueIssues expected to take over 90 days to resolve. Does not apply to PRs.Issues expected to take over 90 days to resolve. Does not apply to PRs.
Metadata
Metadata
Assignees
Labels
design ideaAn issue recording a specific language design idea that folks can potentially pick up.An issue recording a specific language design idea that folks can potentially pick up.long term issueIssues expected to take over 90 days to resolve. Does not apply to PRs.Issues expected to take over 90 days to resolve. Does not apply to PRs.
Per discussion on #1811, there's interest in string interpolation but it's not an area that's been closely examined. This is an area where a proposal would be helpful.
https://en.wikipedia.org/wiki/String_interpolation gives some information and provides some cross-language examples which may be helpful for proposal background and thinking about options. It's important to consider the syntax that multiple languages are looking at.
In Rust, I think https://www.rustnote.com/blog/format_strings.html and rust-lang/rfcs#2795 may provide some interesting ideas and alternatives to think about. Note though that while
Printis using meta-programming in Rust, the leads have expressed interest in exploring non-meta-programming-based solutions first.As a possible data source, it may be worth poking at a few sourcegraph searches (such as this one) to see what developers are doing today.