String Formatting with concatenation or substitution
- by Davio
This is a question about preferences.
Assume a programming language offers these two options to make a string with some variables:
"Hello, my name is ". name ." and I'm ". age ." years old."
StringFormat("Hello, my name is $0 and I'm $1 years old.", name, age)
Which do you prefer and why?
I have found myself using both without any clear…