News for hackers. Stuff that matters.
Re:Another Scala rant on HN by Pxtl on Tuesday December 03, 2013 @12:32PM (#6841735)
Python, C#, all the Java-derived languages... basically every C-ish syntax language except for C/C++ itself use + to concatenate strings. And it's an intuitive concept too - adding two strings is concatentation. That makes sense.

The problem isn't + string-concat, it's silently casting numerics into strings.

  "foo" + 6 + 6
Should be a compiler-error.
Re:Another Scala rant on HN by krapp on Tuesday December 03, 2013 @12:39PM (#6841781)

   "foo" + 6 + 6
>Should be a compiler-error.

Why? "foo" is already a string, getting "foo66" from that makes perfect sense to me.

6 + "foo" though would be crazy.

Re:Another Scala rant on HN by dllthomas on Tuesday December 03, 2013 @12:49PM (#6841832)
Because it makes intent explicit in a way that helps catch errors earlier, and they are kinds of errors that real programmers actually make.
Re:Another Scala rant on HN by krapp on Tuesday December 03, 2013 @12:56PM (#6841881)
Fair enough.