Clojure Lightning Talk

26
JS.Next.Next.Next...

description

David Nolen gives a lightning talk about Clojure

Transcript of Clojure Lightning Talk

Page 1: Clojure Lightning Talk

JS.Next.Next.Next...

Page 2: Clojure Lightning Talk
Page 3: Clojure Lightning Talk
Page 4: Clojure Lightning Talk

We could talk about

Page 5: Clojure Lightning Talk

“Hard” Stuff

Page 6: Clojure Lightning Talk

“Easy” Stuff

Page 7: Clojure Lightning Talk

?

Page 8: Clojure Lightning Talk

ClojureScript

Page 9: Clojure Lightning Talk

First, JavaScript

Page 10: Clojure Lightning Talk
Page 11: Clojure Lightning Talk
Page 12: Clojure Lightning Talk

JavaScript is mainstreaming functional

programming

Page 13: Clojure Lightning Talk

JavaScript is mainstreaming alternative

object systems

Page 14: Clojure Lightning Talk

Yet JavaScript has serious problems

Page 15: Clojure Lightning Talk
Page 16: Clojure Lightning Talk

Problems

๏  Language has woeful deficiencies ๏  Yet, standardization process moves

at a glacial pace ๏  Many, many stakeholders ๏  Legacy Browsers

Page 17: Clojure Lightning Talk

Solutions

Page 18: Clojure Lightning Talk

Build your own language on top of JS!

Page 19: Clojure Lightning Talk

CoffeeScript

Page 20: Clojure Lightning Talk

ClojureScript ๏  Namespaces without the tedium ๏  Can modify native prototypes freely

(because of ubiquitous namespacing). Want to add methods to NodeList? Go ahead!

๏  Ships with rich abstractions - invent new APIs only as a last resort. Bye, bye interoperability nightmares.

Page 21: Clojure Lightning Talk

Browser REPL & Friends

๏  Develop against any browser live without refreshing

๏  Richer data structures - Sets anyone? ๏  Rhino works, Node.js another great

target

Page 22: Clojure Lightning Talk

The Compiler & Friends

๏  ~1000 lines of code ๏  Easy to hack ๏  Google Closure Compiler works

incredible magic - inlining, renaming, dead code elimination

Page 23: Clojure Lightning Talk

Language Features

๏  Add language features via macros ๏  Hate callbacks? Add delimited

continuations ๏  Want Scala/Haskell style pattern

matching - it’s a library

Page 24: Clojure Lightning Talk

Takeaways ๏  The web changes very, very quickly -

complexity surface growing (many possible clients)

๏  Our tools should allow us to control this complexity and gain competitive advantage

๏  JavaScript is ill-suited for the challenges we want to face

Page 25: Clojure Lightning Talk

Clojure(Script)

๏  Robust proven backend technology

๏  Can now leverage the same powerful abstractions on the client

๏  The language can be incrementally grown (via libraries) to adapt to the unique and changing needs of your project

Page 26: Clojure Lightning Talk

Thanks!