Issue 24550 - formattedWrite should support string interpolation
Summary: formattedWrite should support string interpolation
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: x86_64 Linux
: P1 enhancement
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2024-05-14 12:10 UTC by FeepingCreature
Modified: 2024-12-01 16:42 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description FeepingCreature 2024-05-14 12:10:00 UTC
auto sink = appender!(char[]);

const world = "World";

// This works
sink.formattedWrite("Hello %s", world);

// This does not.
sink.formattedWrite(i"Hello $(world)");
Comment 1 Dlang Bot 2024-08-03 03:15:31 UTC
@RubyTheRoobster updated dlang/phobos pull request #9041 "Fix Issue 24550 -  - formattedWrite should support string interpolation " fixing this issue:

- Fix Bugzilla Issue 24550

https://github.com/dlang/phobos/pull/9041
Comment 2 Paul Backus 2024-11-20 20:37:16 UTC
Should we really be calling this "formatted" write when it doesn't use a format string?
Seems like it would make more sense with a different name; for example:

sink.write(i"Hello $(world)");
Comment 3 dlangBugzillaToGithub 2024-12-01 16:42:32 UTC
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/phobos/issues/10550

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB