-2

Yang Zhang provides the following critique of the Scala language stating the following:

The Scala Wart Remover addresses the following issues:

  • Any
  • Any2StringAdd
  • AsInstanceOf
  • DefaultArguments
  • EitherProjectionPartial
  • IsInstanceOf
  • ListOps
  • NoNeedForMonad
  • NonUnitStatements
  • Nothing
  • Null
  • OptionPartial
  • Product
  • Return
  • Serializable
  • Unsafe
  • Var

My question is: Does the Scala WartRemover address the issues outlined Yang Zhang's critique?

Community
  • 1
  • 1
hawkeye
  • 34,745
  • 30
  • 150
  • 304

1 Answers1

5

Mostly not. Wartremover addresses a few of the "which of these lines doesn't compile" trivia questions, by making any code that follows particular bad forms an error. But that was (IMO) never the interesting part of that critique.

Implicit macros (in 2.11) and Shapeless 2.0 address the issue with extending a collection; Miles' 1-line-of-boilerplate-per-type solution is now a 0-line-of-boilerplate-per-type solution (it is achieved using a macro which you could argue is cheating, but you don't have to write the macro yourself, you can call a standard one in Shapeless). And as always we should emphasise that the complaint here is that it's hard to do in Scala what's impossible to do in any other language (except, like, Idris or something).

The community is still not great at responding to criticism, IMO. That said, Scala seems to be getting more and more successful in terms of solving real business problems; I get the feeling that use is growing on most fronts, which suggests that any complexity is either not the problem the critique claims, or at least possible to work around. Certainly at my current employer we're doing more Scala than ever before, and producing better, more maintainable programs, with less effort, as a result.

lmm
  • 17,386
  • 3
  • 26
  • 37