SlideShare una empresa de Scribd logo
1 de 29
Scala for C# Developers
Omer van Kloeten
Hi!
 CTO at
 Eight years working in C#
 Two years suffering Java
 Two years enjoying Scala
 newBrandAnalytics
 AppMyDay
What is Scala?
 JVM Language
 Academic roots
 Released 2003
 Maintained by TypeSafe
 Continuously updated
Why should I care?
 CLR vs. JVM
 The Hummus Manifesto
 Java is old, Scala is the new hotness
 Learn, learn, learn
Who uses Scala?
Similar Backgrounds
 Trying to replace Java
 Benevolent Dictators
 Design-by-committee sucks!
 Strongly and statically typed
 Object-functional
Imperative vs. Functional
Imperative C# Functional LINQ…
…But In Reality
Functional First
Functional C# Functional Scala
 Slight differences
 Underscores… underscores everywhere!
 Strict (immediate) vs. Non-Strict (lazy)
 people.view().filter…
 Lots more than we can cover here…
Syntax Doesn’t Matter, Right?
C#
 class Foo: Bar, IBaz
 class Foo<TBar>
 interface IFoo
 int foo(string s) { return 42;
}
 ...
Scala
 class Foo extends Bar with Baz
 class Foo[TBar]
 trait Foo
 def foo(s: String) = 42
 ...
Syntax Doesn’t Matter,
Defaults Do
C#
 Private by default
 Non-virtual by default
Scala
 Public by default
 Virtual by default
 Java mentality
Immutable By Default
 val and var
 C#’s readonly
 lazy val
 .NET’s Lazy[T]
 Collections
Tuples and Case Classes
 Tuples
 First-class citizen
 Completely typed
Tuples and Case Classes
 Tuples
 First-class citizen
 Completely typed
 Case classes
 Easy, immutable types
Everything Is An Expression
Pattern Matching: Basics
Pattern Matching: Unapply
Pattern Matching: Collections
Pattern Matching: Summary
 switch/case on steroids
 First-class language construct
 Statically checked for comprehensiveness
What Scala Doesn’t Have
 A fast compiler
 C#’s value types
 Built-ins
 Structs
 Enums
 Partial types and methods
 Getters and Setters
 Well, no, but…
 Native for or foreach support
Wait, what?!
Well, kinda… ...is translated to:
Language Topics Not Covered :(
 Streams
 Type inference
 Tail recursion
 Multiple inheritance
 Operators
 Implicits
 Structural Type Definitions
 Companion objects
 Parallelization and
concurrency
 Monads
 Macros
 Reflection
 More underscores!
Tooling and Libraries
 Almost twenty years of Java
 Scala wrappers
 Great community
 Engineers
 Scientists
Tooling: IDEs
 Scala plugin
 JetBrains
 of ReSharper fame
 Scala over Eclipse
 TypeSafe
 Maintainers of Scala
NetBeans, Sublime, etc.
Tooling: REPL
Tooling: Build System
Maven
 Better than Ant
 Bloated
 Written in Java for Java
SBT
 Simple Build Tool
 Irony
 Written in Scala for Scala
Frameworks
 Web Frameworks
 Play! Framework
 Lift
 Scalatra
 Object-Relational Mappers
 Slick
 Squeryl
 Unit Testing
 Specs2
 ScalaTest
Where Do I Start?
 Base stuff:
 Download and install latest JDK (from oracle.com)
 Go to http://scala-lang.org/downloads, download
and install the MSI
 IntelliJ IDEA:
 Go to http://jetbrains.com/idea/download,
download and install the Community Edition
 Demo
Where Do I Start?
 Twitter’s Scala School
 A Tour of Scala
 Another Tour of Scala
 Functional Programming Principles in Scala
 Scala By Example (PDF)
 Programming in Scala (Book)
Thank you
Questions?
@omervk

Más contenido relacionado

Destacado

Open Stack vs .NET Stack - For Startups
Open Stack vs .NET Stack - For StartupsOpen Stack vs .NET Stack - For Startups
Open Stack vs .NET Stack - For StartupsBryan Starbuck
 
Beginning Java for .NET developers
Beginning Java for .NET developersBeginning Java for .NET developers
Beginning Java for .NET developersAndrei Rinea
 
Microsoft Lending Reference Architecture
Microsoft Lending Reference ArchitectureMicrosoft Lending Reference Architecture
Microsoft Lending Reference ArchitectureMike Walker
 
Scala : language of the future
Scala : language of the futureScala : language of the future
Scala : language of the futureAnsviaLab
 
Loan Origination Reference Architecture Deep Dive
Loan Origination Reference Architecture Deep DiveLoan Origination Reference Architecture Deep Dive
Loan Origination Reference Architecture Deep DiveMike Walker
 
A Brief Intro to Scala
A Brief Intro to ScalaA Brief Intro to Scala
A Brief Intro to ScalaTim Underwood
 
Streaming Big Data with Spark, Kafka, Cassandra, Akka & Scala (from webinar)
Streaming Big Data with Spark, Kafka, Cassandra, Akka & Scala (from webinar)Streaming Big Data with Spark, Kafka, Cassandra, Akka & Scala (from webinar)
Streaming Big Data with Spark, Kafka, Cassandra, Akka & Scala (from webinar)Helena Edelson
 
Lambda Architecture with Spark Streaming, Kafka, Cassandra, Akka, Scala
Lambda Architecture with Spark Streaming, Kafka, Cassandra, Akka, ScalaLambda Architecture with Spark Streaming, Kafka, Cassandra, Akka, Scala
Lambda Architecture with Spark Streaming, Kafka, Cassandra, Akka, ScalaHelena Edelson
 
Functional Database Strategies at Scala Bay
Functional Database Strategies at Scala BayFunctional Database Strategies at Scala Bay
Functional Database Strategies at Scala BayJason Swartz
 

Destacado (11)

Scala Jump Start
Scala Jump StartScala Jump Start
Scala Jump Start
 
Open Stack vs .NET Stack - For Startups
Open Stack vs .NET Stack - For StartupsOpen Stack vs .NET Stack - For Startups
Open Stack vs .NET Stack - For Startups
 
Beginning Java for .NET developers
Beginning Java for .NET developersBeginning Java for .NET developers
Beginning Java for .NET developers
 
Microsoft Lending Reference Architecture
Microsoft Lending Reference ArchitectureMicrosoft Lending Reference Architecture
Microsoft Lending Reference Architecture
 
Scala : language of the future
Scala : language of the futureScala : language of the future
Scala : language of the future
 
Loan Origination Reference Architecture Deep Dive
Loan Origination Reference Architecture Deep DiveLoan Origination Reference Architecture Deep Dive
Loan Origination Reference Architecture Deep Dive
 
A Brief Intro to Scala
A Brief Intro to ScalaA Brief Intro to Scala
A Brief Intro to Scala
 
Scala Days NYC 2016
Scala Days NYC 2016Scala Days NYC 2016
Scala Days NYC 2016
 
Streaming Big Data with Spark, Kafka, Cassandra, Akka & Scala (from webinar)
Streaming Big Data with Spark, Kafka, Cassandra, Akka & Scala (from webinar)Streaming Big Data with Spark, Kafka, Cassandra, Akka & Scala (from webinar)
Streaming Big Data with Spark, Kafka, Cassandra, Akka & Scala (from webinar)
 
Lambda Architecture with Spark Streaming, Kafka, Cassandra, Akka, Scala
Lambda Architecture with Spark Streaming, Kafka, Cassandra, Akka, ScalaLambda Architecture with Spark Streaming, Kafka, Cassandra, Akka, Scala
Lambda Architecture with Spark Streaming, Kafka, Cassandra, Akka, Scala
 
Functional Database Strategies at Scala Bay
Functional Database Strategies at Scala BayFunctional Database Strategies at Scala Bay
Functional Database Strategies at Scala Bay
 

Similar a Scala for C# Developers

Scala Days San Francisco
Scala Days San FranciscoScala Days San Francisco
Scala Days San FranciscoMartin Odersky
 
Scala
ScalaScala
Scalasryx
 
Why Scala Presentation
Why Scala  PresentationWhy Scala  Presentation
Why Scala Presentationguestc185e0e
 
Why Scala for Web 2.0?
Why Scala for Web 2.0?Why Scala for Web 2.0?
Why Scala for Web 2.0?Alex Payne
 
Martin Odersky - Evolution of Scala
Martin Odersky - Evolution of ScalaMartin Odersky - Evolution of Scala
Martin Odersky - Evolution of ScalaScala Italy
 
Java Core | Modern Java Concurrency | Martijn Verburg & Ben Evans
Java Core | Modern Java Concurrency | Martijn Verburg & Ben EvansJava Core | Modern Java Concurrency | Martijn Verburg & Ben Evans
Java Core | Modern Java Concurrency | Martijn Verburg & Ben EvansJAX London
 
Introduction to Scala JS
Introduction to Scala JSIntroduction to Scala JS
Introduction to Scala JSKnoldus Inc.
 
Scala the-good-parts
Scala the-good-partsScala the-good-parts
Scala the-good-partsFuqiang Wang
 
A Tour Of Scala
A Tour Of ScalaA Tour Of Scala
A Tour Of Scalafanf42
 
Java Closures
Java ClosuresJava Closures
Java ClosuresBen Evans
 
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...Maarten Balliauw
 
Lambda Expressions in Java 8
Lambda Expressions in Java 8Lambda Expressions in Java 8
Lambda Expressions in Java 8icarter09
 
Martin Odersky: What's next for Scala
Martin Odersky: What's next for ScalaMartin Odersky: What's next for Scala
Martin Odersky: What's next for ScalaMarakana Inc.
 
Scala - The Simple Parts, SFScala presentation
Scala - The Simple Parts, SFScala presentationScala - The Simple Parts, SFScala presentation
Scala - The Simple Parts, SFScala presentationMartin Odersky
 
Absorbing Scala Into Java Ecosystem
Absorbing Scala Into Java EcosystemAbsorbing Scala Into Java Ecosystem
Absorbing Scala Into Java EcosystemEishay Smith
 
Refactoring to Scala DSLs and LiftOff 2009 Recap
Refactoring to Scala DSLs and LiftOff 2009 RecapRefactoring to Scala DSLs and LiftOff 2009 Recap
Refactoring to Scala DSLs and LiftOff 2009 RecapDave Orme
 

Similar a Scala for C# Developers (20)

Scala Days San Francisco
Scala Days San FranciscoScala Days San Francisco
Scala Days San Francisco
 
Scala
ScalaScala
Scala
 
Why Scala Presentation
Why Scala  PresentationWhy Scala  Presentation
Why Scala Presentation
 
Scala
ScalaScala
Scala
 
Why Scala for Web 2.0?
Why Scala for Web 2.0?Why Scala for Web 2.0?
Why Scala for Web 2.0?
 
Martin Odersky - Evolution of Scala
Martin Odersky - Evolution of ScalaMartin Odersky - Evolution of Scala
Martin Odersky - Evolution of Scala
 
Devoxx
DevoxxDevoxx
Devoxx
 
Java Core | Modern Java Concurrency | Martijn Verburg & Ben Evans
Java Core | Modern Java Concurrency | Martijn Verburg & Ben EvansJava Core | Modern Java Concurrency | Martijn Verburg & Ben Evans
Java Core | Modern Java Concurrency | Martijn Verburg & Ben Evans
 
Introduction to Scala JS
Introduction to Scala JSIntroduction to Scala JS
Introduction to Scala JS
 
Java Basic PART I
Java Basic PART IJava Basic PART I
Java Basic PART I
 
Scala the-good-parts
Scala the-good-partsScala the-good-parts
Scala the-good-parts
 
A Tour Of Scala
A Tour Of ScalaA Tour Of Scala
A Tour Of Scala
 
Java Closures
Java ClosuresJava Closures
Java Closures
 
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
 
Lambda Expressions in Java 8
Lambda Expressions in Java 8Lambda Expressions in Java 8
Lambda Expressions in Java 8
 
Martin Odersky: What's next for Scala
Martin Odersky: What's next for ScalaMartin Odersky: What's next for Scala
Martin Odersky: What's next for Scala
 
Scala - The Simple Parts, SFScala presentation
Scala - The Simple Parts, SFScala presentationScala - The Simple Parts, SFScala presentation
Scala - The Simple Parts, SFScala presentation
 
Sadiq786
Sadiq786Sadiq786
Sadiq786
 
Absorbing Scala Into Java Ecosystem
Absorbing Scala Into Java EcosystemAbsorbing Scala Into Java Ecosystem
Absorbing Scala Into Java Ecosystem
 
Refactoring to Scala DSLs and LiftOff 2009 Recap
Refactoring to Scala DSLs and LiftOff 2009 RecapRefactoring to Scala DSLs and LiftOff 2009 Recap
Refactoring to Scala DSLs and LiftOff 2009 Recap
 

Último

Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 

Último (20)

Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 

Scala for C# Developers

  • 1. Scala for C# Developers Omer van Kloeten
  • 2. Hi!  CTO at  Eight years working in C#  Two years suffering Java  Two years enjoying Scala  newBrandAnalytics  AppMyDay
  • 3. What is Scala?  JVM Language  Academic roots  Released 2003  Maintained by TypeSafe  Continuously updated
  • 4. Why should I care?  CLR vs. JVM  The Hummus Manifesto  Java is old, Scala is the new hotness  Learn, learn, learn
  • 6. Similar Backgrounds  Trying to replace Java  Benevolent Dictators  Design-by-committee sucks!  Strongly and statically typed  Object-functional
  • 7. Imperative vs. Functional Imperative C# Functional LINQ… …But In Reality
  • 8. Functional First Functional C# Functional Scala  Slight differences  Underscores… underscores everywhere!  Strict (immediate) vs. Non-Strict (lazy)  people.view().filter…  Lots more than we can cover here…
  • 9. Syntax Doesn’t Matter, Right? C#  class Foo: Bar, IBaz  class Foo<TBar>  interface IFoo  int foo(string s) { return 42; }  ... Scala  class Foo extends Bar with Baz  class Foo[TBar]  trait Foo  def foo(s: String) = 42  ...
  • 10. Syntax Doesn’t Matter, Defaults Do C#  Private by default  Non-virtual by default Scala  Public by default  Virtual by default  Java mentality
  • 11. Immutable By Default  val and var  C#’s readonly  lazy val  .NET’s Lazy[T]  Collections
  • 12. Tuples and Case Classes  Tuples  First-class citizen  Completely typed
  • 13. Tuples and Case Classes  Tuples  First-class citizen  Completely typed  Case classes  Easy, immutable types
  • 14. Everything Is An Expression
  • 18. Pattern Matching: Summary  switch/case on steroids  First-class language construct  Statically checked for comprehensiveness
  • 19. What Scala Doesn’t Have  A fast compiler  C#’s value types  Built-ins  Structs  Enums  Partial types and methods  Getters and Setters  Well, no, but…  Native for or foreach support
  • 20. Wait, what?! Well, kinda… ...is translated to:
  • 21. Language Topics Not Covered :(  Streams  Type inference  Tail recursion  Multiple inheritance  Operators  Implicits  Structural Type Definitions  Companion objects  Parallelization and concurrency  Monads  Macros  Reflection  More underscores!
  • 22. Tooling and Libraries  Almost twenty years of Java  Scala wrappers  Great community  Engineers  Scientists
  • 23. Tooling: IDEs  Scala plugin  JetBrains  of ReSharper fame  Scala over Eclipse  TypeSafe  Maintainers of Scala NetBeans, Sublime, etc.
  • 25. Tooling: Build System Maven  Better than Ant  Bloated  Written in Java for Java SBT  Simple Build Tool  Irony  Written in Scala for Scala
  • 26. Frameworks  Web Frameworks  Play! Framework  Lift  Scalatra  Object-Relational Mappers  Slick  Squeryl  Unit Testing  Specs2  ScalaTest
  • 27. Where Do I Start?  Base stuff:  Download and install latest JDK (from oracle.com)  Go to http://scala-lang.org/downloads, download and install the MSI  IntelliJ IDEA:  Go to http://jetbrains.com/idea/download, download and install the Community Edition  Demo
  • 28. Where Do I Start?  Twitter’s Scala School  A Tour of Scala  Another Tour of Scala  Functional Programming Principles in Scala  Scala By Example (PDF)  Programming in Scala (Book)

Notas del editor

  1. Image CC-BY-NC-SA, Alejandro Crosa http://www.flickr.com/photos/alejandrocrosa/5247567841/New version every yearBugfixes every few months
  2. Logos are copyright their respective owners
  3. Anders HejlsbergMartinOdersky
  4. String is immutable in C#
  5. Match values, typesUnderscore syntax
  6. Underscore syntax
  7. While is still while
  8. In .NET: MSBuild,NAnt, Cruise Control.NET
  9. Play, like ASP.NET MVC – LinkedIn, KloutLift, like ASP.NET – FoursquareScalatra, like NancyFX – LinkedIn, The Guardian
  10. Photo CC-BY, Ian Muttoo http://www.flickr.com/photos/imuttoo/2123301945/