Clojure: What Just Happened? Rich Hickey Clojure is Becoming - - PowerPoint PPT Presentation

clojure what just happened
SMART_READER_LITE
LIVE PREVIEW

Clojure: What Just Happened? Rich Hickey Clojure is Becoming - - PowerPoint PPT Presentation

Clojure: What Just Happened? Rich Hickey Clojure is Becoming Popular Popular* Functional Lisp Not terribly novel How Popular? 8000+ member mailing list 82,000+ messages 700+ on IRC #2 (behind Scala) non-Java JVM


slide-1
SLIDE 1

Clojure: What Just Happened?

Rich Hickey

slide-2
SLIDE 2

Clojure is Becoming Popular

  • Popular*
  • Functional
  • Lisp
  • Not terribly novel
slide-3
SLIDE 3

How Popular?

  • 8000+ member mailing list

82,000+ messages

  • 700+ on IRC
  • #2 (behind Scala) non-Java JVM server lang
  • Many companies use in production

Startups to Fortune 50

  • > Dozen books, several 2nd editions
  • 3 Clojure conferences per year
slide-4
SLIDE 4

Github New Repos 2013 (thus far)

Rank Lang New repos 15 Scala 6918 16 Go 6884 17 Prolog 5829 18 Clojure 4904 19 Haskell 4681 20 Lua 4048

slide-5
SLIDE 5

Context

  • JVM
  • PHP

, Python, Perl, Ruby broke C-lineage stranglehold demonstrated dynamic lang agility

  • Paul Graham’s essays
  • Crushing complexity of stateful OO
  • JSON, XML
slide-6
SLIDE 6

Right Place, Right Time?

  • In fall 2007 when announced, no one had

heard of me nor Clojure

  • 18,000 hits the first day
slide-7
SLIDE 7

Survey 2012 - Growth

Stopped 1% < 1 year 43% 1 year 18% 2 years 18% 3 years 14% 4+years 6%

1,372 respondents

http://cemerick.com/2012/08/06/results-of-the-2012-state-of-clojure-survey/

slide-8
SLIDE 8

From Where?

Java Ruby Python C# Erlang/Scala/Haskell Other 10 20 30 40

slide-9
SLIDE 9

Why?

slide-10
SLIDE 10

Practical

  • Target - use it wherever you could use Java

both reach and performance

  • Tool, for professional programmers

hobbyists welcome

  • General purpose programming
slide-11
SLIDE 11

Small

  • A basic Lisp evaluation model
  • No continuations, condition systems etc
slide-12
SLIDE 12

Simple

  • Few, orthogonal axes
  • Functions, data, state model, evaluation

model, macros etc

slide-13
SLIDE 13

FP Benefits, Distilled

  • Pure functions + immutable data
  • Made practical and idiomatic
  • Efficient persistent data structures the

default

  • Functional core library
  • No mutable local variables
  • Clearly separate state constructs
slide-14
SLIDE 14

Opinionated

  • Fewer choices
  • Set of decisions made and encoded
  • Everything works together
slide-15
SLIDE 15

Eschews Types for Information

  • Simple data - lists, vectors, maps, sets
  • Associative collections in lieu of objects
  • First-class names (keywords)
slide-16
SLIDE 16

Minimal Type-Specific Code

  • just generic map-manipulation code
  • therefore, much less code
  • more reuse
  • better interop and libs
  • facilitates systems building
  • less compiler help
slide-17
SLIDE 17

Runtime Polymorphic

  • People coming from OO understand and

expect this

  • Abstractions for everything (even invocation)
  • Polymorphism constructs are ‘open’
slide-18
SLIDE 18

Concurrency?

  • Not so much
  • Part of initial story
  • Has to be there
  • but rarely needed
slide-19
SLIDE 19

Hosted

  • Dominant hosts (JVM, JS)
  • Great interop
  • Libraries out of the gate
  • No migration pain
  • Easy to sneak in

“just another library”

slide-20
SLIDE 20

Lisp

  • Still has appeal
  • Small core, rest is libs
  • Runtime redef, code loading, macros
  • Code-as-data, read/print, REPL
  • but enhancements matter

fp, collections, syntax, abstractions

slide-21
SLIDE 21

Permissive

  • “Consenting adults” language
  • Support the right thing
  • vs disallow the wrong
slide-22
SLIDE 22

Support and Evangelism

  • 3 years x 10 hours/day

Mailing list and IRC

  • Lots of talks and travel
slide-23
SLIDE 23

Stability

  • All programs from first book (2009) still

work

  • Always a high priority
slide-24
SLIDE 24

The Blub Paradox?

  • People don’t know what they are missing?
  • They know what they are getting
  • Simpler and more robust programs
  • High productivity
  • Resulting systems work, perform well,

and are flexible

  • Clojure is an effective tool
slide-25
SLIDE 25

Biggest Wins

Functional REPL Platform/JVM Immutability Productivity Macros Concurrency 22.5 45 67.5 90

slide-26
SLIDE 26

Gateway Drug?

Scala Haskell Python Common Lisp Ruby Java Scheme Erlang 10 20 30 40

If Clojure disappeared, then what?

“too depressing to contemplate”

slide-27
SLIDE 27

Thanks!