Hi,
I have been using Java for 5+ years, and just started looking into Scala. It is pretty obvious that the language is well thought-out, and covers some serious shortcomings of Java (particularly syntactic overhead). But, one thing that I did not understand and get really confused about is to give developers soooo many options for doing the same thing...
Basically, every time I see some feature, there are 2-3 or even more options for doing it. Just to give an example, you can define a function as:
def foo() = { .. }
def foo() : Unit = { ... }
def foo() = ...
def foo() : Unit = ...
Or you can return a value with "return" statement, but also the last statement will be returned too. you can use curly braces, but in some cases you can skip them. You can use semicolon, but it is optional too. Having None,Some,Unit,Null,Nil,null, ....
With closures and placeholders, it almost becomes a nightmare to understand.
Basically, every chapter I read in the book, there are multiple ways of doing something with different syntax, and if two developers have totally different styles, it can get to a point where they won't even understand each other's code. And, this will create issues in a big group.
Furthermore, this will be OK for seasoned developers, but it will be a nightmare for juniors and people who are just starting out, don't you think?
As I said in the beginning, don't get me wrong. I like what I have seen so far and definitely not trying to bash the language at all. But it is getting to a point where it might be really really confusing to understand someone else's code.
Thanks...
Basically, every time I see some feature, there are 2-3 or even more options for doing it. Just to give an example, you can define a function as:
def foo() = { .. }
def foo() : Unit = { ... }
def foo() = ...
def foo() : Unit = ...
Or you can return a value with "return" statement, but also the last statement will be returned too.
you can use curly braces, but in some cases you can skip them.
You can use semicolon, but it is optional too.
Having None,Some,Unit,Null,Nil,
With closures and placeholders, it almost becomes a nightmare to understand.
Basically, every chapter I read in the book, there are multiple ways of doing something with different syntax, and if two developers have totally different styles, it can get to a point where they won't even understand each other's code. And, this will create issues in a big group.
Furthermore, this will be OK for seasoned developers, but it will be a nightmare for juniors and people who are just starting out, don't you think?
As I said in the beginning, don't get me wrong. I like what I have seen so far and definitely not trying to bash the language at all. But it is getting to a point where it might be really really confusing to understand someone else's code.
--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-user+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Basically, every time I see some feature, there are 2-3 or even more options for doing it.