Scala Versus Java

preview_player
Показать описание
Java is no longer alone on the JVM. It now has to share space with its younger siblings JRuby, Jython, Groovy, Clojure, Scala and many others. Each new language has its own set of advantages and disadvantages compared to Java, and its own niche in which it performs best, but Scala in particular is gaining momentum.

In this presentation to San Francisco Java User Group on January 18, 2012, Marakana's own Dan Rosen introduces Scala to Java developers and shows off some of its expressive power -- higher-order functions, type inference, and pattern matching -- by building a simple web service. You'll never look at Java the same way.

Рекомендации по теме
Комментарии
Автор

Excellent video, especially the code samples are exactly to the point.

Magnificent work, Dan Rosen.

I will surely watch your other video about Monads.

Scala rules!

MINDoSOFT
Автор

C# is object oriented, so while you can do most of this in it, it's organized differently. In OO programming, it's easy to make objects, hard to make functions (which aren't tied in some way to a specific object). In functional programming, it's hard to make objects but easy to make functions. Scala, being functional, makes it easy to keep your program modular; however, Scala also allows you to represent objects easily as well. It puts a lot of tools in your kit.

wessidestory
Автор

Superb video. I think I'll rewatch!
Love Scala, it's just great.

jimtoxford
Автор

Regarding the optimization of synchronized in JVM (0:30:00). It does only optimize single threaded access to a synchronized method. So it still stays slow in a multithreaded environment.

wjblazkowicz
Автор

The no-spin quote from Yammer:

"Right now at Yammer we're moving our basic infrastructure stack over to Java, and keeping Scala support around in the form of façades and legacy libraries. [..] The essence of it is that the friction and complexity that comes with using Scala instead of Java isn't offset by enough productivity benefit or reduction of maintenance burden for it to make sense as our default language."

chrimony
Автор

The 1 to 10 List example is NOT tail recursive as claimed

AetherElemental
Автор

34:30 I just tried this in Intellij with Scala 2.13 and I annotated that function with @tailrec and it failed to compile.

Aabil
Автор

I'm looking for experienced Scala Senior Developers in the Toronto area. Wouldn't usually advertise on YouTube but finding it very tricky to find this very specific skill set. It's a great opportunity so drop me a line
Thanks,
Chris

cbeers
Автор

my confession - since i learnt java, there is never any prog. lang. raise my interest or make me try to love it until i heard of scala last year, now i got to say, i don't want to program java any more. imho, although project lambda incorporates fp features, but java's foundation wasn't functional in day 1, while scala is rooted as both oo and functional

jinilover
Автор

doesn't C# have all this and more? (just a noob question).

Desher
Автор

If there is anything I hate when it comes to talks like these, those are presentations with code written on. Start your freaking notebook, open a freaking editor/IDE and start showing people freaking capabilites of Scala on freaking live example!

OverG
Автор

*Hello, Good video But at **34:40** the guy is wrong his fonction is not tail recursive*

Correct way :

def listToTen(i:Int): List[Int] = {

def listToTenUtil(i:Int, acc:List[Int] = List.empty): List[Int] = {

if(i == 10 ) acc
else
listToTenUtil(i+1, i :: acc)

}

listToTenUtil(1)

uploadvoice
Автор

Tiny mistake at 28:48

It should be private static Bar bar

NadavBenedek
Автор

That "tail recursion" is not a tail recursion, since the result of the recursion is a parameter to cons.

dcsobral
Автор

Scala is like a janitor for the mess Java code makes, but sometimes you could have important papers and important things that get cleaned up by the "janitor." Therefore, Scala is an abstraction to Java.

thegrinch
Автор

Foo, Bar, Baz should be banned from the exemple world !! =)
even in the simplest ones

Автор

Remember when clojure were in java 7? cross your fingers is all I'm saying

rain_deer
Автор

Absolutely stellar lecture. Thanks a million!

yanivtalmusic
Автор

Oh, that too bad. So why do you even need to comment when you don't even use Scala just as you don't use C/C++, .Net, etc?

proyb
Автор

i feel sorry for the guy doing the presentation. the audience is so crap!

Diggerb