Right, good and informative answer, but I think it is partially missing
Andre’s point though. With some better contextual looking the compiler
could have given a more helpful message, like "
size does not take
parentheses after it." which would be much less obtuse than what it did
actually render as an error message.
This isn’t an isolated incident, the Scala compiler gives error messages
that confuse certainly beginners in the language, but also all the way
though advanced-intermediate users as well. I think the quality of error
messages does indeed slow down Scala developers and thus impedes the
Scala’s use more broadly.
It is also true that poor compiler errors certainly don’t only come from
the Scala compiler. Java’s can often be quite unhelpful and even misleading
and certainly verbose to the point of obfuscation. And before that C,
Pascal, FORTRAN, ADA, COBOL, they all put the burden on the software
engineer to figure out the true error and solution.
Scala wants to be a better language to code in, right? This is one area
where there are no limitations of outside compatibility, backwards
compatibility or such, it’s a doable thing that can make using Scala better.