Skip to content

Single-quotes should not allow string expansion #48

@DartBot

Description

@DartBot

This issue was originally filed by [email protected]


It is a de facto standard, introduced with the shell and taken for granted in other languages that use dollar for expansion (PHP as the main example), that single quotes prevent all expansion.

The example:
  print('fib(20) = ${fib(20)}');
therefore exhibits an unconventional behavior in that it will expand the expression inside dollar-preceeded-brackets.

I would expect Dart to behave more conventionally by requiring double-quotes for inner string expansion, or single-quotes with concatenation.

Metadata

Metadata

Assignees

Labels

area-languageDart language related items (some items might be better tracked at github.com/dart-lang/language).closed-not-plannedClosed as we don't intend to take action on the reported issuetype-enhancementA request for a change that isn't a bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions