Re:The myth of using Scala as a better Java
by willtim on Thursday March 02, 2017 @01:15PM
(#13776608)
No Java is simply not expressive enough, that's why so many frameworks exist. Adding Lambdas certainly helps, but you are missing out if you restrict yourself to Java.
Let me give an example of how Java limits ones thinking.
Look at these Stack overflow answers: http://stackoverflow.com/questions/28459498/why-are-java-str...
They are great examples of Java/C# users being unable to explain succinctly what the APIs are doing, because they lack the necessary common language. They have to answer with great essays describing various scenarios and use cases.
A Haskell user just needs to compare the type signatures, showing where the IO is happening. She will then understand the differences and the implications.
Re:The myth of using Scala as a better Java
by geodel on Thursday March 02, 2017 @01:58PM
(#13777059)
I guess I am not obsessed with expressiveness. I think of programing as something to help business/users to get on with what they want to do, as opposed to exercise in elegant self-expression. Towards that goal Java, Go seems very fine languages to me.
Re:The myth of using Scala as a better Java
by willtim on Thursday March 02, 2017 @02:02PM
(#13777108)
But as my example pointed out, expressiveness is often the difference between being able to understand something and not. Expressiveness permits better abstractions, better composition and better libraries, allowing cheaper and faster software. Something business users will appreciate.
Re:The myth of using Scala as a better Java
by geodel on Thursday March 02, 2017 @02:20PM
(#13777274)
I do not disagree that Java, Go could be better. It is just that I remain big sceptic because such better languages leaves very important things which matter in real world and covered by Java, Go etc but not by better languages e.g tooling, GC, powerful runtimes, build tools and so on.
I would wait till Scala does something great natively without standing on shoulders of JVM/JRE etc.
I have written Java code and rewritten code large parts done by others. The issue I have noticed is architecture and framework mindset of people who just do not think solving problem at hand is important and good enough task. It would be ok if they wrote elegant library/framework but it was still junk and solved only very narrow problem. At each instance it was the problem of culture and people using Java because I was perfectly able to write productive and simple code with just standard plus very few extra libraries.
> Another language in this category is Go. It's still young enough that people haven't used it much outside the niche it was created
Huh, may be you should be able to give example of highly expressive and popular languages which are a hit with developers in very different domains. Because it is easy to pile on popular Java and increasingly popular Go without talking about alternatives.