Hacker News new | past | comments | ask | show | jobs | submit login

You start with an integer and end up with a string. The intermediate steps required to get from one to the other aren't particularly relevant to the point I was making.



The string concatenation API for Java IS terrible, but see modersky's post for the reasoning.

Just don't mistake a bad API for some kind of belief that Scala in general idly converts between types. The weakest point is APIs that use methods defined in java.lang.Object (e.g. toString and equals); they can universally use these methods without restricting the type.

Note that if you define a type as a knowledge of what actions can be performed on an object, then no type safety has been lost; toString() is universally available, though it may not do exactly what you want.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: