The state of string interpolation
Anonymouse
asdf at asdf.net
Mon Dec 10 22:46:26 UTC 2018
On Monday, 10 December 2018 at 20:57:52 UTC, Atila Neves wrote:
> I meant compared to std.conv.text. If it fits on one line then
> `text` is more than fine.
My use case is terminal colours in format patterns, which quickly
become mental gymnastics and extremely bug prone/easy to get
wrong. They're largely oneliners, and interpolation would be a
huge help.
// string logtint, warningtint;
// Exception e;
logger.warningf("IRC Parse Exception: %s%s %s(at
%1$s%4$s%3$s:%1$s%5$d%3$s)",
logtint, e.msg, warningtint, e.file, e.line);
(Apologies if I misread your meaning)
More information about the Digitalmars-d
mailing list