Join Slack
Powered by
+ concatenates strings, but not numbers
# announcements
h
Hullaballoonatic
11/29/2018, 11:11 PM
+ concatenates strings, but not numbers
b
bdawg.io
11/30/2018, 3:34 AM
That’s intentional because it’s a strongly-typed language
Copy code
val a = 1 val b = 1 "$a$b" == "11"
bdawg.io
11/30/2018, 3:36 AM
The difference also is operators are designed to be overloaded. There’s no overloading in a niche operator that always performs string concatenation
2
Views
Open in Slack
Previous
Next