Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Por que clojure
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Octavio Turra
September 14, 2016
Programming
59
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Por que clojure
Pontos observados da linguagem clojure
Octavio Turra
September 14, 2016
Transcript
7 slides
Por que Clojure FUNCIONAL
Como surgiu? Criada por Rich Hickey https://clojure.org/ “Realm of Lisp”
[Benevolent dictator] Concorrência Funcional Homoiconicidade 2009 : 1.0 / 2016 : 1.8 λ
Por que eu usaria? Homoiconicidade se dá pelo fato de
que os dialetos de Lisp respeitam uma estruturação homogênea. Lisp (operador ..operandos) //form (funcao parametro parametro) (+ 1 2) (map sum [1 2 3 4 5])
Por que eu usaria? Anonymous functions Funcional (fn [arg] (println
arg)) Nil Punning High order functions Closures (str nil) => “” (map #(* % %) [1 2 3 4 5]) (defn f [x] (fn [y] (+ x y))) Threading expressions (->> (range 10) (map inc)) Laziness (take 5 (positive-numbers))
Por que eu usaria? Multimétodos Polimorfismo em Runtime (defmulti area
:shape) (defmethod area :rectangle ==[{:keys [l w]}] (* l w)) (defmethod area :circle ==[{:keys [r]}] (* Math/PI r r)) (area {:shape :circle :r 10}) => 314.1592653589793 (area {:shape :rectangle :l 5 :w 10}) => 50 Protocolos (defprotocol Foo ====(bar [x y]) ====(baz [x] [x y])) (deftype Bar [data] Foo ====(bar [x y] (println x y)) ====(baz [x] (println x)) ====(baz [x y] (println x y))) (let [b (Bar. "some data")] ====(.bar b "param") ====(.baz b) ====(.baz b "baz with param"))
Por que eu usaria? Macros (defmacro defprivate [name args &
body] ==`(defn ~(symbol name) ~args =====(if (:user @session) =======(do ~@body) ======="please log in"))) (defprivate foo [greeting] ==(println greeting))
Quem usa? http://clojure.org/community/companies
Other Decks in Programming
See All in Programming
エラーチャンネルのボールを拾い続けて鍛えるエンジニアの地力 / phpcon-niigata2026
meihei3
1
500
SODA - FACT BOOK(EN)
sodainc
1
280
特急いなほ as a Workflow / 20261107jaws-festa-2026-akita-lt
kasacchiful
PRO
0
110
AI時代のIaC入門 〜なぜインフラをコードで管理したいのか?〜 / Introduction to IaC in the AI Era
akihisaikeda
6
1.6k
AIが実装を担う時代の「技術設計」と「チームマネジメント」
kamina_zzz
2
440
プロジェクトコードをキレイキレイしよう!暗黙的な参照を読み解く静的解析
ostk0069
0
220
まずはコードより業務と向き合う:テーブル解体のためにPdMを呼んだ話
sakawe_ee
0
270
Debian JP Projectのサーバー構成
uwabami
1
180
Scalaの型でマルチテナントの認可を守る
nextbeatdev
0
180
선언형 햅틱 라이브러리 진동을 소개합니다
l2hyunwoo
1
330
はじめてのPLATEAU
nokonoko1203
1
670
Goコンパイラを作ってGoをもっと理解する / Build a Go compiler to better understand Go
ikura_hamu
0
140
Featured
See All Featured
Building Better People: How to give real-time feedback that sticks.
wjessup
371
20k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
2
2.1k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
620
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
370
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.2k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
470
The Cult of Friendly URLs
andyhume
79
7.1k
Intergalactic Javascript Robots from Outer Space
tanoku
273
28k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
600
Music & Morning Musume
bryan
48
7.5k