SlideShare a Scribd company logo
1 of 26
Download to read offline
Scala
Johan Andrén
johan.andren@mejsla.se
Agenda
Språk

Miljö

Komma igång
Bakgrund
Lausanne
Språket

Det bästa av flera världar
(precis som kebabpizza)
Objektorientering

+

Funktionell
Programmering
Funktionell Programmering

max(a, b) =
if (a > b) a
else b
Objektorientering

Stora abstraktioner

Funktionell
Programmering

Små abstraktioner
Typsystem
Låter oss beskriva begränsningar
Typinferens
Låter oss slippa beskriva begränsningar
Scala

Java

15 000
Scala

30 000

10 000

3000
Miljö

Hur och var Scala passar in
Java

javac

Klass1.class

Klass1.java

Scala
Klass2.scala

Bytekod

scalac

Bytekod
Klass2.class
Bytekod
Arkiv
Arkiv
Arkiv

Klass1.class

Arkiv
Bytekod
Klass2.class

app.jar

app.jar

JVM
Arkiv
app.jar

Arkiv
Arkiv
Arkiv
Arkiv

app.jar

javalib-x.jar

JVM

Arkiv
scala-library.jar
Scala

Java

Scala

Java
Scala

Java

Java

Java

Java

Java
Komma igång
Hur kommer man igång med Scala?
(och lite annat)
Resurser för att lära sig
Kurser

Nätet

Böcker

Mentor
Macros

Avancerad FP
Avancerad Scala-OO
Scala-OO
Grundläggande FP
Java i Scala
Scala

Java

Tester

Produktionskod
Java

Java

Java

Scala

Java

Java
Scala Paradox
”If I were to pick a language
to use today other than
Java it would be Scala”
James Gosling
”If I someone had shown me the
’Programming in Scala’ book back in 2003,
I´d probably have never created Groovy”
James Strachan

”No other language on the JVM seems
as capable of being a ’replacement for
Java’ as Scala, and the momentum
behind Scala is now unquestionable”

Charles Nutter
Summering
Språk

Miljö

Komma igång

More Related Content

Viewers also liked

Kesan aktiviti manusia terhadap alam sekitar
Kesan aktiviti manusia terhadap alam sekitarKesan aktiviti manusia terhadap alam sekitar
Kesan aktiviti manusia terhadap alam sekitarHazlee Gapal
 
περιηγηση στο λουτρακισωστό
περιηγηση στο λουτρακισωστόπεριηγηση στο λουτρακισωστό
περιηγηση στο λουτρακισωστόvfragk1
 
семинар практикум нфT
семинар   практикум нфTсеминар   практикум нфT
семинар практикум нфToollggaa444
 
โครงสร้างการบริหารงานโรงเรียนวัดไผ่ตัน
โครงสร้างการบริหารงานโรงเรียนวัดไผ่ตันโครงสร้างการบริหารงานโรงเรียนวัดไผ่ตัน
โครงสร้างการบริหารงานโรงเรียนวัดไผ่ตันLerd Live
 
Задействование временной рабочей силы в странах Евросоюза. Великобритания.
Задействование временной рабочей силы в странах Евросоюза. Великобритания.Задействование временной рабочей силы в странах Евросоюза. Великобритания.
Задействование временной рабочей силы в странах Евросоюза. Великобритания.ZEST Outsourcing
 
Kpss 2013/1 İktisat Yerleştirme Puanları
Kpss 2013/1 İktisat Yerleştirme PuanlarıKpss 2013/1 İktisat Yerleştirme Puanları
Kpss 2013/1 İktisat Yerleştirme PuanlarıTaner Kaşıkçı
 
Dieta Dukan Método Ilustrado_
Dieta Dukan Método Ilustrado_Dieta Dukan Método Ilustrado_
Dieta Dukan Método Ilustrado_Pri Mayer
 

Viewers also liked (14)

Kesan aktiviti manusia terhadap alam sekitar
Kesan aktiviti manusia terhadap alam sekitarKesan aktiviti manusia terhadap alam sekitar
Kesan aktiviti manusia terhadap alam sekitar
 
Śniadanie Daje Moc
Śniadanie Daje MocŚniadanie Daje Moc
Śniadanie Daje Moc
 
bestfriends
bestfriendsbestfriends
bestfriends
 
Śniadanie Daje Moc
Śniadanie Daje MocŚniadanie Daje Moc
Śniadanie Daje Moc
 
περιηγηση στο λουτρακισωστό
περιηγηση στο λουτρακισωστόπεριηγηση στο λουτρακισωστό
περιηγηση στο λουτρακισωστό
 
семинар практикум нфT
семинар   практикум нфTсеминар   практикум нфT
семинар практикум нфT
 
โครงสร้างการบริหารงานโรงเรียนวัดไผ่ตัน
โครงสร้างการบริหารงานโรงเรียนวัดไผ่ตันโครงสร้างการบริหารงานโรงเรียนวัดไผ่ตัน
โครงสร้างการบริหารงานโรงเรียนวัดไผ่ตัน
 
Remates indalsu
Remates indalsuRemates indalsu
Remates indalsu
 
Sortida 4
Sortida 4Sortida 4
Sortida 4
 
Задействование временной рабочей силы в странах Евросоюза. Великобритания.
Задействование временной рабочей силы в странах Евросоюза. Великобритания.Задействование временной рабочей силы в странах Евросоюза. Великобритания.
Задействование временной рабочей силы в странах Евросоюза. Великобритания.
 
IMPORTANCIA DO JEJUM
IMPORTANCIA DO JEJUMIMPORTANCIA DO JEJUM
IMPORTANCIA DO JEJUM
 
Kpss 2013/1 İktisat Yerleştirme Puanları
Kpss 2013/1 İktisat Yerleştirme PuanlarıKpss 2013/1 İktisat Yerleştirme Puanları
Kpss 2013/1 İktisat Yerleştirme Puanları
 
HIV/SIDA
HIV/SIDAHIV/SIDA
HIV/SIDA
 
Dieta Dukan Método Ilustrado_
Dieta Dukan Método Ilustrado_Dieta Dukan Método Ilustrado_
Dieta Dukan Método Ilustrado_
 

More from Johan Andrén

Next generation message driven systems with Akka
Next generation message driven systems with AkkaNext generation message driven systems with Akka
Next generation message driven systems with AkkaJohan Andrén
 
Buiilding reactive distributed systems with Akka
Buiilding reactive distributed systems with AkkaBuiilding reactive distributed systems with Akka
Buiilding reactive distributed systems with AkkaJohan Andrén
 
Next generation actors with Akka
Next generation actors with AkkaNext generation actors with Akka
Next generation actors with AkkaJohan Andrén
 
Next generation message driven systems with Akka
Next generation message driven systems with AkkaNext generation message driven systems with Akka
Next generation message driven systems with AkkaJohan Andrén
 
Reactive stream processing using Akka streams
Reactive stream processing using Akka streams Reactive stream processing using Akka streams
Reactive stream processing using Akka streams Johan Andrén
 
Networks and types - the future of Akka
Networks and types - the future of AkkaNetworks and types - the future of Akka
Networks and types - the future of AkkaJohan Andrén
 
Reactive streams processing using Akka Streams
Reactive streams processing using Akka StreamsReactive streams processing using Akka Streams
Reactive streams processing using Akka StreamsJohan Andrén
 
Building reactive distributed systems with Akka
Building reactive distributed systems with Akka Building reactive distributed systems with Akka
Building reactive distributed systems with Akka Johan Andrén
 
Akka streams - Umeå java usergroup
Akka streams - Umeå java usergroupAkka streams - Umeå java usergroup
Akka streams - Umeå java usergroupJohan Andrén
 
Streaming all the things with akka streams
Streaming all the things with akka streams   Streaming all the things with akka streams
Streaming all the things with akka streams Johan Andrén
 
Asynchronous stream processing with Akka Streams
Asynchronous stream processing with Akka StreamsAsynchronous stream processing with Akka Streams
Asynchronous stream processing with Akka StreamsJohan Andrén
 
Scala usergroup stockholm - reactive integrations with akka streams
Scala usergroup stockholm - reactive integrations with akka streamsScala usergroup stockholm - reactive integrations with akka streams
Scala usergroup stockholm - reactive integrations with akka streamsJohan Andrén
 
VJUG24 - Reactive Integrations with Akka Streams
VJUG24  - Reactive Integrations with Akka StreamsVJUG24  - Reactive Integrations with Akka Streams
VJUG24 - Reactive Integrations with Akka StreamsJohan Andrén
 
Introduction to akka actors with java 8
Introduction to akka actors with java 8Introduction to akka actors with java 8
Introduction to akka actors with java 8Johan Andrén
 
Introduction to Akka
Introduction to AkkaIntroduction to Akka
Introduction to AkkaJohan Andrén
 
Akka frukostseminarium
Akka   frukostseminariumAkka   frukostseminarium
Akka frukostseminariumJohan Andrén
 
Introduction to Scala
Introduction to ScalaIntroduction to Scala
Introduction to ScalaJohan Andrén
 

More from Johan Andrén (18)

Next generation message driven systems with Akka
Next generation message driven systems with AkkaNext generation message driven systems with Akka
Next generation message driven systems with Akka
 
Buiilding reactive distributed systems with Akka
Buiilding reactive distributed systems with AkkaBuiilding reactive distributed systems with Akka
Buiilding reactive distributed systems with Akka
 
Next generation actors with Akka
Next generation actors with AkkaNext generation actors with Akka
Next generation actors with Akka
 
Next generation message driven systems with Akka
Next generation message driven systems with AkkaNext generation message driven systems with Akka
Next generation message driven systems with Akka
 
Reactive stream processing using Akka streams
Reactive stream processing using Akka streams Reactive stream processing using Akka streams
Reactive stream processing using Akka streams
 
Networks and types - the future of Akka
Networks and types - the future of AkkaNetworks and types - the future of Akka
Networks and types - the future of Akka
 
Reactive streams processing using Akka Streams
Reactive streams processing using Akka StreamsReactive streams processing using Akka Streams
Reactive streams processing using Akka Streams
 
Building reactive distributed systems with Akka
Building reactive distributed systems with Akka Building reactive distributed systems with Akka
Building reactive distributed systems with Akka
 
Akka streams - Umeå java usergroup
Akka streams - Umeå java usergroupAkka streams - Umeå java usergroup
Akka streams - Umeå java usergroup
 
Streaming all the things with akka streams
Streaming all the things with akka streams   Streaming all the things with akka streams
Streaming all the things with akka streams
 
Asynchronous stream processing with Akka Streams
Asynchronous stream processing with Akka StreamsAsynchronous stream processing with Akka Streams
Asynchronous stream processing with Akka Streams
 
Scala usergroup stockholm - reactive integrations with akka streams
Scala usergroup stockholm - reactive integrations with akka streamsScala usergroup stockholm - reactive integrations with akka streams
Scala usergroup stockholm - reactive integrations with akka streams
 
VJUG24 - Reactive Integrations with Akka Streams
VJUG24  - Reactive Integrations with Akka StreamsVJUG24  - Reactive Integrations with Akka Streams
VJUG24 - Reactive Integrations with Akka Streams
 
Introduction to akka actors with java 8
Introduction to akka actors with java 8Introduction to akka actors with java 8
Introduction to akka actors with java 8
 
Introduction to Akka
Introduction to AkkaIntroduction to Akka
Introduction to Akka
 
Akka frukostseminarium
Akka   frukostseminariumAkka   frukostseminarium
Akka frukostseminarium
 
Introduction to Scala
Introduction to ScalaIntroduction to Scala
Introduction to Scala
 
Duchess scala-2012
Duchess scala-2012Duchess scala-2012
Duchess scala-2012
 

Scala frukostseminarium