Re: Groovy Creator James Strachan on Scala
Posted: Jul 22, 2009 8:02 PM
> I have an example of the type of issue with Scala that I
> I think makes it unsuitable for less proficient
> (note: he's working with the new collections in trunk, not
> the released version of Scala)
> I've had similar experiences before. They don't happen
> much anymore. Not that I don't get error messages that
> seem to point in the opposite direction of the solution,
> but that I've learned how to "work with the compiler" when
> they arise so that we can communicate better.
I had those experiences too, and for the most part don't have them anymore either. I too learned what the compiler really means when it occasionally gives a more obscure error message. I always felt this was a usability issue of the compiler rather than an inherent problem with the language. For example, one common error I think is to forget the equals sign before a method body. When you do that, the compiler error message gives no hint that this may be the problem. I think time could be spent to improve the user-friendliness of compiler error messages.
Martin also mentioned that type errors in general can be puzzling sometimes even for the gurus, and I believe they have some projects going with regards to making the errors more explorable. He mentioned that in the interview we did with him that we published in May.
> The problem is I see a significant percentage of
> developers who would either be unable or unwilling to
> overcome these issues.
I see your point.
> Here's an interesting thought for you: Scala the first
> language out of over two dozen where I've had to spend
> significant time fixing compile-time errors. I've come to
> appreciate that as a substantial strength of Scala, but
> it's a very different feel from Java or dynamic languages.
> It's like working with C++ templates on steroids (but
> t with more concise error messages).
Yes, it can look like a dynamic language because of the conciseness, but working with it definitely feels like working with a compiled language.