Just another example of missing string interpolation
Walter Bright
newshound2 at digitalmars.com
Tue Oct 17 17:24:32 UTC 2023
On 10/12/2023 6:39 AM, Andrea Fontana wrote:
> ```
> stderr.write("${clear}\r{$white}Progress:${clear}${progress}%
> \t${white}Speed:${clear} ${curSpeed} ${unit}");
> ```
With DIP1027:
```
stderr.write("$clear\r$(white)Progress:$clear$progress%
\t$(white)Speed:$clear $curSpeed $unit");
```
If it's a simple identifier, the { } are not necessary.
https://github.com/dlang/DIPs/blob/master/DIPs/rejected/DIP1027.md#description
More information about the Digitalmars-d
mailing list