I am familiar with "Scala coding styles and conventions?"
I also have read this article which states that a programmer is able to produce only so many lines of code per day and therefore a language with a "better" syntax can only help in this direction.
As there is nothing perfect in the world, the syntax of Scala has its disadvantages (of course someone can see these as pure advantages). I am talking about stuff like:
def someMethod(someParameter: Int): Boolean = {
// import here in the middle of nowhere
import com.example.bad.VeryBad._
// semicolon here? maybe?
val two = 1+1;
// nested function here
def boo(a: Int) = a+1;
// now do something useful
println(boo(two))
// for God's sake don't use return!!!
two == 2
}
If one has Java background (or even C++, C#, etc.) it is kind of weird to have import statements in the middle of a function, to have nested functions and I am not even going into other language constructs.
I am a bit sceptical about the real productivity gain coming with Scala. How do you experience this? Do you apply all (as much as possible) of the coding conventions and is this a real benefit? Is there a better way to wrap ones head around this style of code?
P.S. maybe this whole post can be moved to Programmers or similar...