News for hackers. Stuff that matters.
Re:Choosing Scala by codygman on Thursday November 28, 2013 @06:35PM (#6817080)
Isn't this something that type inference should catch though?
Re:Choosing Scala by lmm on Friday November 29, 2013 @04:42AM (#6818626)
The type of "5" + 5 is inferred to be String. If you pass it to print(), which takes a String, that's not an error, and printing "55" is presumably what you meant to happen. If you tried to pass it to a method expecting an integer, you'd get an error.