I have a personal dislike of operator overloading. I originally ported AT&Ts 
C++ to the Mac several lifetimes back. We (my company) outlawed using them back 
in the early days of C++ due to readability issues. Scala seems to be obsessed 
with conciseness to the point of being difficult to read. Made up operators are 
never obvious and since they have no human readable names give no clue to their 
purpose. The Mahout Scala DSL is a new purpose built language and so needs to 
be understood as an extension to Scala, the new operators are sort of like R so 
that helps a little. The alternative is Java’s extreme verboseness. Java 8 does 
little to solve this and has no operator overloading. I think even C# is moving 
to OO.

Java 8 seems to have some support for lazy sequence evaluation. I’m not enough 
of an expert to compare the two, 
http://java.dzone.com/articles/lazy-sequences-implementation

Having recently come from Java to Scala I’m still struggling with the syntax. 
Some things make life so much easier, like implicit typing. But to do implicit 
typing Scala makes all sorts of inferred choices and if you don’t know what is 
going on under the hood you can get pretty tangled up. 

It should be noted that Scala and Java can use each other’s libs 
interchangeably since they are both JVM based so Bandi can stick with Java if 
desired. I’ve done some Scala importing Java, which is quite easy, but not the 
other way around. Here’s an old post I found on Java using Scala: 
http://lampwww.epfl.ch/~michelou/scala/using-scala-from-java.html

Spark has APIs in Java (v 8?), Scala, and Python. AFAIK only Scala is supported 
with an interactive Spark Shell, using the Scala REPL. This is what is beneath 
the new Mahout shell. 

I’ve wondered if Mahout might want to do something similar (support the big 3 
simultaneously) but unless there is a great outcry for Java 8 sticking to one 
language (given the ability for people to use Java if they want) seems like 
much less work.

Several languages based on the JVM have popped up due to the lack of innovation 
in Java and Scala seems to be the one getting the most traction. To me the big 
deal is lambdas, closures, anon functions, blocks, whatever you want to call 
them. Functional programming is so much easier in Scala than what I’ve seen of 
Java 8.

Looking at the state of things today I’m siding with Scala.

On May 25, 2014, at 11:09 PM, Ted Dunning <[email protected]> wrote:

Great to see.

Now what about the other 4 points that I mentioned?



On Sun, May 25, 2014 at 8:33 PM, bandi shankar <[email protected]>wrote:

> *yes, we can serialize java 8 lambdas .**
> **http://kingsfleet.blogspot.com/2013/12/lambda-will-it-serialize.html **
> **
> **Since in future we are going to adapt to java 8 .**
> **So it's better to be prepared for it. Since we can do everything with
> java 8 , than why to be dependent on scala.**
> **Atleast we should start discussing it now to be well prepared for
> future. *
> 
> On 05/25/2014 07:14 PM, Ted Dunning wrote:
> 
>> Scala allows lazy evaluation and operator overloading and lambdas which
>> can
>> be serialized.  Java 8 provides lambdas that I am not sure if you can
>> serialize.
>> 
>> Also, Spark already uses Scala which has been around for a decade.  Java8
>> isn't here yet.
>> 
>> 
>> 
>> 
>> On Sun, May 25, 2014 at 12:48 PM, bandi shankar <[email protected]
>>> wrote:
>> 
>> Hi,
>>> 
>>> I was just thinking , do we still need scala . Since in java 8 we have
>>> all(probably) kind of feature provided by scala.
>>> Since I am new to group , so just thinking why not to make mahout away
>>> from scala. Is there any specific reason to adopt scala.
>>> 
>>> Bandi
>>> 
>>> 
> 

Reply via email to