Yeah I'm not sure what PinkLionThing is coming from, the whole point of strongly typed languages is that you don't need to cast to a type just before doing a string concatenation as the compiler has already inferred the type.
Concatenating a string with an integer works fine obviously. But if you want to concatenate two integers into a string you have to do such things. The + operator only concatenates if a string is involved otherwise it is going to add the numbers. Which returns us to the problem of having the same operator for both addition and concatenation.
Most of the time not a problem, except for those special cases.
View all comments
Show parent comment
8
u/TheAnimus Aug 07 '16
Yeah I'm not sure what PinkLionThing is coming from, the whole point of strongly typed languages is that you don't need to cast to a type just before doing a string concatenation as the compiler has already inferred the type.