string concatenation is weird.

We can do stuff like

writeln(x);

where x is, say a struct and it prints fine

but when we do

writeln(x ~ " ok");

it fails and requires us to convert x!

Why can't string concatenation automatically try to convert the arguments? Is there any reason this is bad behavior?

How bout then having writeln parse the arguments as a string(take an alias or something first) and then automatically convert them?

Seems like there is no real excuse to add such obfuscation...

Obviously I can roll my own but that is not an acceptable answer.



Reply via email to