Skip to content

Design idea: string interpolation  #2005

Open
@jonmeow

Description

@jonmeow

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 Print is 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.

Metadata

Metadata

Labels

design ideaAn 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.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions