文档介绍:Scala & Clojure
Playing Nice
David Pollak
QCon Beijing April, 2015
!
!
!
!
About ***@dpp
Wrote some Spreadsheets
Founded Lift/Wrote Beginning Scala
Coding Clojure 3 Years
Crazy Passionate Lawyer-trained
Tech Dude
!
!
!
Preso Structure
Background on Scala & Clojure
Live Coding
Thoughts & Questions
!
!
!
!
Scala
Hybrid Functional/OO Language…
All things to all people
Gnarly (特别危险的冲浪条件) Type
System
Java-like syntax
Excellent Java Interopt
!
!
!
!
Clojure
Modern Lisp/Functional
Optional Type Systems
Opinionated re: Immutability
Super-Excellent Java Interopt
pile to
JVM ByteCode
… Can Subclass
Java Classes
… And Implement
Java Interfaces
!
!
!
!
Similarities
Immutable Data & Collections
Super easy to pass “functions”
(really anonymous inner classes)
Great for plexity &
concurrent systems
Both address “Expression Problem”
Expression Problem
“The goal is to define a
datatype by cases, where one
can add new cases to the
datatype and new functions
over the datatype, without
piling existing code.”