Skip to content

Language support for Interpolated Strings #83

Description

@foobit

Really neat language! Would adding support for Interpolated Strings be difficult?

Building strings can get wordy using the + operator (pun intended):
"The area of interest is bounded by " + p1.X + "," + p1.Y + " and " + p2.X + "," + p2.Y + "."

IMO, having the values inlined instead of at the end (like string.format) makes it easier to read.

Possible suggested styles:

C#6

$"The area of interest is bounded by {p1.X}, {p1.Y} and {p2.X}, {p2.Y}"

Javascript

'The area of interest is bounded by ${p1.X}, ${p1.Y} and ${p2.X}, ${p2.Y}'

Swift

'The area of interest is bounded by \(p1.X), \(p1.Y) and \(p2.X), \(p2.Y)'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions