News for hackers. Stuff that matters.
Re:Scala Best Practices by danielbarla on Friday October 31, 2014 @08:38AM (#8538399)
I'm not very current on the Scala tooling - is there a reasonable lint tool which enforces these types of suggestions?
Re:Scala Best Practices by adriaanm on Friday October 31, 2014 @10:23AM (#8538860)
We've been working on https://github.com/scala/scala-abide. Our aim is to provide a nice platform for others to develop and distribute style checking rules. We (the core scalac devs) intend to focus on keeping the abide platform up to date with the compiler, letting the community evolve the set of rules.

Due to resource constraints, we haven't made a big push in advertising it yet, but we're happy to work with you if you'd like to start implementing rules. Have a look at recent PRs for some examples.

Re:Scala Best Practices by danielbarla on Monday November 03, 2014 @01:09AM (#8549540)
Thanks for the info, and kudos on the good work in general!

Abide looks quite nice, although I'm a very occasional user of Scala so far, so I'm not sure I'd be very good at coming up with and implementing rules. I'll definitely spread the word to some friends who use Scala more frequently, and may be able to contribute.

Re:Scala Best Practices by adriaanm on Tuesday November 11, 2014 @08:28AM (#8589664)
Thanks! Please don't hesitate to ask (ideally on scala-internals) if you'd like some pointers to get started with abide.
Re:Scala Best Practices by virtualwhys on Friday October 31, 2014 @08:52AM (#8538452)
Brian McKenna's Wart Remover[1] is an excellent tool for capturing silent (but deadly) errors at compile time.

Can also turn on various scalac -X flags to, for example, turn warnings into compile time errors. Invoke scala REPL with -X to see available flags.

[1] https://github.com/typelevel/wartremover

Re:Scala Best Practices by danielbarla on Friday October 31, 2014 @09:58AM (#8538728)
Thanks, very useful.

It's nice to see that both Wart Remover and OP's post had reasonable explanations and examples to justify each rule. This makes the rule all that much better as a learning experience (contrast with, e.g. "I have never seen a piece of code that was not improved by refactoring it to remove the continue statement" from JavaScript: The Good Parts, which leaves me baffled and no wiser).

Re:Scala Best Practices by ionforce on Friday October 31, 2014 @10:48AM (#8539015)
IntelliJ's Scala plug-in has some support for things like these.
Re:Scala Best Practices by tempodox on Friday October 31, 2014 @08:43AM (#8538411)
I think it's commonly called your brain.