SlideShare une entreprise Scribd logo
1  sur  31
Why

      Scala
        for Web 2.0?
Hi.

I’m Alex Payne,
API Lead at Twitter, Inc.

Also, co-author of
Programming Scala,
out later this year from O’Reilly.
A brief history of the
languages behind Web 2.0.
Let’s talk about
recession engineering.
Can we still afford
to build
things we love
with tools we love?
fast
functional
expressive
statically typed
object-oriented
concurrent
beautiful
C
                   C++
                   Ruby
                    PHP
                 Python
                 Erlang
                   Java
[JVM dynamic languages]
And then, there’s Scala.
Features.
Java compatibility
keeps your ROI returning.
Actors
keep concurrency simple.
Immutability
keeps concurrency predictable.
Type inference
keeps code clean.
First-class functions
keep things exible.
Traits
keep behavior reusable.
Pattern matching
keeps your needles out of haystacks.
XML literals and query methods
keep XML tolerable.
More:
case classes
properties
existential types
implicit conversions
lazy evaluation
parser combinators
monads
annotations
... !
The price: complexity.
But it’s worth it.
Wins.
A queuing system that
takes the hits.
An API test suite that
helps us sleep.
People search that
returns in milliseconds.
Community.
Groups:
Bay Area Scala Enthusiasts (BASE)
Chicago Area Scala Enthusiasts (CASE)
New York Scala Enthusiasts (NYSE)
etc. etc.
Education:
Programming Scala
Programming in Scala
The Busy Java Developer’s Guide...
Why Scala?
Introduction to High-Level Prog’ing...
Scala Language Speci cation
Blogs &c.:
Code Commit
Coderspiel
Scala-Blogs
Graceless Failures
Delicious
Reddit
FriendFeed
Twitter Search
Tools:
IDEs: Eclipse, NetBeans, IDEA
Editors: Emacs, VIM, TextMate
JavaRebel
Whatever JVM tools you like!
Libraries and frameworks
Lift
Specs
ScalaCheck
Con ggy
Scalax, Scalaz
every Java library ever
even libraries in other JVM languages!
So, why Scala for Web 2.0?
Thank you. Questions?

          scala-lang.org
         bit.ly/progscala
        twitter.com/al3x
              al3x.net

Contenu connexe

Tendances

flatMap Oslo presentation slides
flatMap Oslo presentation slidesflatMap Oslo presentation slides
flatMap Oslo presentation slides
Martin Odersky
 
Exploring C# DSLs: LINQ, Fluent Interfaces and Expression Trees
Exploring C# DSLs: LINQ, Fluent Interfaces and Expression TreesExploring C# DSLs: LINQ, Fluent Interfaces and Expression Trees
Exploring C# DSLs: LINQ, Fluent Interfaces and Expression Trees
rasmuskl
 

Tendances (20)

Introduction to Scala
Introduction to ScalaIntroduction to Scala
Introduction to Scala
 
Preparing for Scala 3
Preparing for Scala 3Preparing for Scala 3
Preparing for Scala 3
 
Introduction to Scala
Introduction to ScalaIntroduction to Scala
Introduction to Scala
 
The Evolution of Scala
The Evolution of ScalaThe Evolution of Scala
The Evolution of Scala
 
Scala-Ls1
Scala-Ls1Scala-Ls1
Scala-Ls1
 
Imperative and-functional-programming
Imperative and-functional-programmingImperative and-functional-programming
Imperative and-functional-programming
 
C++ to java
C++ to javaC++ to java
C++ to java
 
Scalax
ScalaxScalax
Scalax
 
Road to Dynamic LINQ - Part 2
 Road to Dynamic LINQ - Part 2 Road to Dynamic LINQ - Part 2
Road to Dynamic LINQ - Part 2
 
What To Leave Implicit
What To Leave ImplicitWhat To Leave Implicit
What To Leave Implicit
 
Why Scala Is Taking Over the Big Data World
Why Scala Is Taking Over the Big Data WorldWhy Scala Is Taking Over the Big Data World
Why Scala Is Taking Over the Big Data World
 
Devoxx
DevoxxDevoxx
Devoxx
 
What To Leave Implicit
What To Leave ImplicitWhat To Leave Implicit
What To Leave Implicit
 
Why functional programming in C# & F#
Why functional programming in C# & F#Why functional programming in C# & F#
Why functional programming in C# & F#
 
Object Oriented Programming : Part 2
Object Oriented Programming : Part 2Object Oriented Programming : Part 2
Object Oriented Programming : Part 2
 
Road to Dynamic LINQ Part 1
Road to Dynamic LINQ Part 1Road to Dynamic LINQ Part 1
Road to Dynamic LINQ Part 1
 
flatMap Oslo presentation slides
flatMap Oslo presentation slidesflatMap Oslo presentation slides
flatMap Oslo presentation slides
 
Exploring C# DSLs: LINQ, Fluent Interfaces and Expression Trees
Exploring C# DSLs: LINQ, Fluent Interfaces and Expression TreesExploring C# DSLs: LINQ, Fluent Interfaces and Expression Trees
Exploring C# DSLs: LINQ, Fluent Interfaces and Expression Trees
 
Programming Paradigm & Languages
Programming Paradigm & LanguagesProgramming Paradigm & Languages
Programming Paradigm & Languages
 
Comparing Golang and understanding Java Value Types
Comparing Golang and understanding Java Value TypesComparing Golang and understanding Java Value Types
Comparing Golang and understanding Java Value Types
 

En vedette

Scala the good and bad parts
Scala the good and bad partsScala the good and bad parts
Scala the good and bad parts
benewu
 
Introduction to Functional Programming with Scala
Introduction to Functional Programming with ScalaIntroduction to Functional Programming with Scala
Introduction to Functional Programming with Scala
pramode_ce
 
Tph platinum
Tph platinum Tph platinum
Tph platinum
carchoui
 
Bournekaleb 3 point lighting presentation
Bournekaleb 3 point lighting presentationBournekaleb 3 point lighting presentation
Bournekaleb 3 point lighting presentation
Simmerj94
 
You Already Speak French
You Already Speak FrenchYou Already Speak French
You Already Speak French
Justin Frieman
 

En vedette (20)

Scala - the good, the bad and the very ugly
Scala - the good, the bad and the very uglyScala - the good, the bad and the very ugly
Scala - the good, the bad and the very ugly
 
A Brief Intro to Scala
A Brief Intro to ScalaA Brief Intro to Scala
A Brief Intro to Scala
 
Scala the good and bad parts
Scala the good and bad partsScala the good and bad parts
Scala the good and bad parts
 
Pragmatic Real-World Scala (short version)
Pragmatic Real-World Scala (short version)Pragmatic Real-World Scala (short version)
Pragmatic Real-World Scala (short version)
 
Advanced Functional Programming in Scala
Advanced Functional Programming in ScalaAdvanced Functional Programming in Scala
Advanced Functional Programming in Scala
 
Introduction to Functional Programming with Scala
Introduction to Functional Programming with ScalaIntroduction to Functional Programming with Scala
Introduction to Functional Programming with Scala
 
Intro to Apache Spark
Intro to Apache SparkIntro to Apache Spark
Intro to Apache Spark
 
“Insulin” for Scala’s Syntactic Diabetes
“Insulin” for Scala’s Syntactic Diabetes“Insulin” for Scala’s Syntactic Diabetes
“Insulin” for Scala’s Syntactic Diabetes
 
Why Spark Is the Next Top (Compute) Model
Why Spark Is the Next Top (Compute) ModelWhy Spark Is the Next Top (Compute) Model
Why Spark Is the Next Top (Compute) Model
 
Keynote, PNW Scala 2013
Keynote, PNW Scala 2013Keynote, PNW Scala 2013
Keynote, PNW Scala 2013
 
Go Reactive: Building Responsive, Resilient, Elastic & Message-Driven Systems
Go Reactive: Building Responsive, Resilient, Elastic & Message-Driven SystemsGo Reactive: Building Responsive, Resilient, Elastic & Message-Driven Systems
Go Reactive: Building Responsive, Resilient, Elastic & Message-Driven Systems
 
Ch.6: The Great Divide
Ch.6: The Great DivideCh.6: The Great Divide
Ch.6: The Great Divide
 
Art 3 brainstorms
Art 3 brainstormsArt 3 brainstorms
Art 3 brainstorms
 
The present tense
The present tenseThe present tense
The present tense
 
Tph platinum
Tph platinum Tph platinum
Tph platinum
 
Bournekaleb 3 point lighting presentation
Bournekaleb 3 point lighting presentationBournekaleb 3 point lighting presentation
Bournekaleb 3 point lighting presentation
 
A Scala Corrections Library
A Scala Corrections LibraryA Scala Corrections Library
A Scala Corrections Library
 
You Already Speak French
You Already Speak FrenchYou Already Speak French
You Already Speak French
 
Portrait lighting
Portrait lightingPortrait lighting
Portrait lighting
 
Prepositions
PrepositionsPrepositions
Prepositions
 

Similaire à Scala

Why Scala Presentation
Why Scala  PresentationWhy Scala  Presentation
Why Scala Presentation
guestc185e0e
 
Ruby and Rails short motivation
Ruby and Rails short motivationRuby and Rails short motivation
Ruby and Rails short motivation
jistr
 

Similaire à Scala (20)

Scala
ScalaScala
Scala
 
Why Scala Presentation
Why Scala  PresentationWhy Scala  Presentation
Why Scala Presentation
 
Scala Introduction - Meetup Scaladores RJ
Scala Introduction - Meetup Scaladores RJScala Introduction - Meetup Scaladores RJ
Scala Introduction - Meetup Scaladores RJ
 
Introducing Scala to your Ruby/Java Shop : My experiences at IGN
Introducing Scala to your Ruby/Java Shop : My experiences at IGNIntroducing Scala to your Ruby/Java Shop : My experiences at IGN
Introducing Scala to your Ruby/Java Shop : My experiences at IGN
 
Infographic on Scala Programming Language
Infographic on Scala Programming LanguageInfographic on Scala Programming Language
Infographic on Scala Programming Language
 
The State of Scala
The State of ScalaThe State of Scala
The State of Scala
 
Introduction to Scala JS
Introduction to Scala JSIntroduction to Scala JS
Introduction to Scala JS
 
Sviluppare applicazioni nell'era dei "Big Data" con Scala e Spark - Mario Car...
Sviluppare applicazioni nell'era dei "Big Data" con Scala e Spark - Mario Car...Sviluppare applicazioni nell'era dei "Big Data" con Scala e Spark - Mario Car...
Sviluppare applicazioni nell'era dei "Big Data" con Scala e Spark - Mario Car...
 
Evolving IGN’s New APIs with Scala
 Evolving IGN’s New APIs with Scala Evolving IGN’s New APIs with Scala
Evolving IGN’s New APIs with Scala
 
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
 
A Tour Of Scala
A Tour Of ScalaA Tour Of Scala
A Tour Of Scala
 
Ruby and Rails short motivation
Ruby and Rails short motivationRuby and Rails short motivation
Ruby and Rails short motivation
 
Ten Compelling Reasons to Go the Scala Development Way - Metadesign Solutions
Ten Compelling Reasons to Go the Scala Development Way - Metadesign SolutionsTen Compelling Reasons to Go the Scala Development Way - Metadesign Solutions
Ten Compelling Reasons to Go the Scala Development Way - Metadesign Solutions
 
Viridians on Rails
Viridians on RailsViridians on Rails
Viridians on Rails
 
The Scala Programming Language
The Scala Programming LanguageThe Scala Programming Language
The Scala Programming Language
 
Scala & Swagger at Wordnik
Scala & Swagger at WordnikScala & Swagger at Wordnik
Scala & Swagger at Wordnik
 
Ruby Metaprogramming 08
Ruby Metaprogramming 08Ruby Metaprogramming 08
Ruby Metaprogramming 08
 
Sviluppare applicazioni nell'era dei "Big Data" con Scala e Spark - Mario Car...
Sviluppare applicazioni nell'era dei "Big Data" con Scala e Spark - Mario Car...Sviluppare applicazioni nell'era dei "Big Data" con Scala e Spark - Mario Car...
Sviluppare applicazioni nell'era dei "Big Data" con Scala e Spark - Mario Car...
 
Lessons Learned: Scala and its Ecosystem
Lessons Learned: Scala and its EcosystemLessons Learned: Scala and its Ecosystem
Lessons Learned: Scala and its Ecosystem
 
Ruby on rails
Ruby on railsRuby on rails
Ruby on rails
 

Dernier

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Dernier (20)

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
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
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
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)
 
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
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
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
 

Scala

Notes de l'éditeur

  1. Came to previous C4s for Io, Erlang. Have programmed for money in Java, JavaScript, C, PHP, Perl, Ruby, and Python. Have programmed for fun, love, or spite in x86 Assembly, Erlang, Lua, Objective-C, various Lisps, Haskell, O-Caml, C++, Io, Erlang.
  2. Ruby’s poor VM performance, monkeypatching and cultural issues, questionable for large systems. We had new services to build, didn’t want to continue with Ruby.
  3. Ruby’s poor VM performance, monkeypatching and cultural issues, questionable for large systems. We had new services to build, didn’t want to continue with Ruby.
  4. Ruby’s poor VM performance, monkeypatching and cultural issues, questionable for large systems. We had new services to build, didn’t want to continue with Ruby.
  5. My personal criteria for a good systems language.
  6. Why not these languages? Talk about their issues. We ultimately knew we wanted a JVM language, just not Java.
  7. Ruby’s poor VM performance, monkeypatching and cultural issues, questionable for large systems. We had new services to build, didn’t want to continue with Ruby.
  8. The JVM has chops. Address Java interoperability, Martin Odersky’s credentials, etc. Worse comes to worse, just fall back to Java. Most other JVM-hosted languages can’t claim the same speed as Scala.
  9. The “concurrency crisis” has been underway since the early 1990s. Ref: HOPL2 intro speech. Scala handles actors as nicely as Erlang and Io. Actors are neat, but we haven’t made extensive use of them at Twitter just yet. Also Pi and Join Calculi.
  10. A pragmatic approach to data structure mutability. Most data structures available in mutable and immutable flavors. Requires thoughtful decision-making, but that pays off.
  11. Static typing is a blessing and a curse. Scala lets you ignore typing until you can put it to work for you.
  12. Once you have this feature in a language, you simply can’t do without it. Passing functions around is awesome - a bit like function pointers. Also: “higher-order” methods (methods that take other methods, like ‘map’), anonymous methods. Everything is an expression, everything has a value.
  13. Once you’ve gotten used to Ruby’s modules, it’s another difficult language feature to give up. Subclassing can be a nightmare, and isn’t always the correct design solution. Traits enable powerful abstraction of cross-cutting concerns.
  14. Every programmer matches patterns all day, every day. It’s just that most languages don’t have a lexical facility for making that task easier.
  15. XML ain’t going away any time soon. If you have to interact with XML a lot, Scala is an awesome choice. It’s got that JavaScript+JSON peanut butter n’ jelly quality.
  16. Address those features particular to Scala: case classes, properties, existential types, implicits.
  17. The bad, the ugly.
  18. Ruby’s poor VM performance, monkeypatching and cultural issues, questionable for large systems. We had new services to build, didn’t want to continue with Ruby.
  19. Ruby’s poor VM performance, monkeypatching and cultural issues, questionable for large systems. We had new services to build, didn’t want to continue with Ruby.
  20. Ruby’s poor VM performance, monkeypatching and cultural issues, questionable for large systems. We had new services to build, didn’t want to continue with Ruby.