On Monday, 23 October 2017 at 12:48:33 UTC, Atila Neves wrote:
On Monday, 23 October 2017 at 09:13:45 UTC, Satoshi wrote:writeln(`Foo is {foo} and bar is {bar}`);writeln("Foo is ", foo, "and bar is ", bar"); Two more characters.
You have actually demonstrates exactly what I feel is the main benefit of the "{foo}" syntax: Your example is missing a space before 'and'. This type of error is very easy to overlook with the ", " syntax, and much more visible with the "{foo}" syntax. The "%s" syntax also solves this problem, but at the cost of moving the formatted value away from the point of formatting.
-- Biotronic
