Yammer moving away from Scala

I'm surprised I haven't seen this mentioned by now:

Email critique of Scala: https://gist.github.com/1406238

A sample new story on it: http://www.infoq.com/news/2011/11/yammer-scala

It's a very detailed email from an employee at Yammer on why they are
migrating from Scala back to Java. I know it was intended to be private,
but it's gone public now, and there's nothing personal in the email anyways.

Re: Yammer moving away from Scala



On Wed, Nov 30, 2011 at 9:27 PM, Aleksey Nikiforov <lexn82 [at] gmail [dot] com> wrote:
When I first dicovered that for loops

Just to be very clear, there are no "for loops", are you talking about for comprehensions or just "foreach"?
 
were not optimized I was surpised. When I discovered a resistance to optimizing them I was shocked. The decision to do nothing about for loops baffles me to this day.

Also, in my opinion, the critisims layed against SBT is entirely justified. I think the idea of having a Scala based build tool is great, and the incremental compilation is great, and the console is great. However the custom DSL is extremely hard to use, and the implementation source code is impossible to read. Additionally many features just do not work as expected, either by design or due to bugs.




--
Viktor Klang

Akka Tech LeadTypesafe - Enterprise-Grade Scala from the Experts

Twitter: @viktorklang

Re: Yammer moving away from Scala

2011/11/30 √iktor Ҡlang <viktor [dot] klang [at] gmail [dot] com>


On Wed, Nov 30, 2011 at 9:27 PM, Aleksey Nikiforov <lexn82 [at] gmail [dot] com> wrote:
When I first dicovered that for loops

Just to be very clear, there are no "for loops", are you talking about for comprehensions or just "foreach"?

You are not a compiler, you are a human being who can infer from the context. So you know EXACTLY what I mean. Your question serves no useful purpose but adds the flames.

Maybe I'm too used to scala-user... didnt realize this was on debate. I am respectfully taking myself out of this dicussion.

Re: Yammer moving away from Scala



2011/11/30 Aleksey Nikiforov <lexn82 [at] gmail [dot] com>
2011/11/30 √iktor Ҡlang <viktor [dot] klang [at] gmail [dot] com>


On Wed, Nov 30, 2011 at 9:27 PM, Aleksey Nikiforov <lexn82 [at] gmail [dot] com> wrote:
When I first dicovered that for loops

Just to be very clear, there are no "for loops", are you talking about for comprehensions or just "foreach"?

You are not a compiler, you are a human being who can infer from the context. So you know EXACTLY what I mean. Your question serves no useful purpose but adds the flames.

What are you talking about, I asked a perfectly sensible question.
Are you talking about optimizing foreach or are you talking about something more general when it comes to desugaring for comprehensions, you definitely don't need to get all ballistic for no reason.
 

Maybe I'm too used to scala-user... didnt realize this was on debate. I am respectfully taking myself out of this dicussion.




--
Viktor Klang

Akka Tech LeadTypesafe - Enterprise-Grade Scala from the Experts

Twitter: @viktorklang

Re: Yammer moving away from Scala

On Wed, Nov 30, 2011 at 10:37:02PM +0100, √iktor Ҡlang wrote:
> > You are not a compiler, you are a human being who can infer from the
> > context. So you know EXACTLY what I mean. Your question serves no useful
> > purpose but adds the flames.
> >
>
> What are you talking about, I asked a perfectly sensible question.
> Are you talking about optimizing foreach or are you talking about something
> more general when it comes to desugaring for comprehensions, you definitely
> don't need to get all ballistic for no reason.

If you needed clarification because you were confused then Aleksey
wrongly took offense at your reply. If you were taking the opportunity
to snipe at him for using slightly inexact terminology then his
reaction would make sense.

Martin (and most of us I think) understood what he meant, and Martin
referred to a "standard for loop" in his reply. I don't think anyone
would reply to Martin Odersky pointing out the fact that Scala doesn't
have for loops and asking for clarification.

Online, it's easy to perceive hostility online when none exists. It's
also easy to be casually rude to people. Let's all try to lighten up a
bit.

Re: Yammer moving away from Scala

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am 30.11.2011 19:24, schrieb Jeff Nowakowski:
> I'm surprised I haven't seen this mentioned by now:
>
> Email critique of Scala: https://gist.github.com/1406238

Well - did you notice, what's wrong with his first example (for vs. while)?

scala>
var start = System.currentTimeMillis();
var total = 0;for(i <- 0 until 100000) { total += i };
var end = System.currentTimeMillis();
println(end-start);
println(total);
114
scala>
scala<
var start = System.currentTimeMillis();
var total = 0;var i=0;while(i < 100000) { i=i+1;total += i };
var end = System.currentTimeMillis();
println(end-start);
println(total);
8

The second one is faster, but both are wrong! :) There is an int-overrun
happening, so it has to be:

var total = 0L;for(i <- 0 until 100000) { total += i };
and
var total = 0L;var i=0;while(i < 100000) { i=i+1;total += i };
to avoid that, but there is a far faster solution:
val n = 100000L
val result= n*n/2-n

But calculating the result isn't the aim of the example? Not? What is
it? In far more complex computations, the costs of looping often vanish.

Copyright © 2013 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland