3 ms·
Yes, as an alternate syntax, interpolation works well to disambiguate your intent, which supports my point. It's really just a highly specialized form of a dif
by kbenson 11y ago
Yes, as an alternate syntax, interpolation works well to disambiguate your intent, which supports my point. It's really just a highly specialized form of a different operator, which says I work on strings, so anything I see that isn't a string coerce to a string. For example, in Perl
$varOne . $varTwo
Is entirely equivalent to
"$varOne$varTwo"
The question is why Scala chose to use + when it had other, non-ambiguous options, like above.
- airless_bar 11y agoTo be more familiar to Java developers. There are some thoughts about migrating people away from + toward string interpolation. But automated conversion tools are required before this can happen.