Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
The Taming of the Deftype
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Baishampayan Ghose
May 11, 2012
Programming
160
2
Share
The Taming of the Deftype
Slides from a talk I presented at Clojure/West 2012, San Jose, CA.
Baishampayan Ghose
May 11, 2012
More Decks by Baishampayan Ghose
See All by Baishampayan Ghose
The Revenge of the Pragmatists
bg
0
280
The Postmodern Programmer
bg
0
110
The Roots of Go
bg
1
1.8k
On Solving Problems
bg
0
150
Other Decks in Programming
See All in Programming
タクシーアプリ『GO』の バックエンド開発のおける AI利活用と若者のすべて
pyama86
3
1.6k
TypeScriptだけでAIエージェントを作る フロント・エージェント・インフラのフルスタック実践
har1101
6
990
Cloudflare で始める Data Platform
ta93abe
0
300
AIエージェントの隔離技術の徹底比較
kawayu
0
420
サークル参加から学ぶ、小さな事業の回し方
yuzneri
0
230
CLIであることを活かしたGitHub Copilot CLI活用術 / GitHub Copilot CLI Pro Tips & Tricks
nao_mk2
1
960
ReactとSvelteのその先、Ripple-TS / Beyond React and Svelte: Ripple-TS
ssssota
3
760
20260514 - build with ai 2026 - build LINE Bot with Gemini CLI
line_developers_tw
PRO
0
470
AI駆動開発勉強会 広島支部 第一回勉強会 AI駆動開発概要とワークショップ
hayatoshimiu
0
360
AWSはOSSをどのように 考えているのか?
akihisaikeda
1
140
プロパティの順序で型推論が壊れる!? TypeScript6.0の修正からContext-Sensitivityの仕組みを追う
bicstone
2
1k
inferと仲良くなる10分間
ryokatsuse
1
250
Featured
See All Featured
Amusing Abliteration
ianozsvald
1
180
Evolving SEO for Evolving Search Engines
ryanjones
0
200
How to train your dragon (web standard)
notwaldorf
97
6.6k
Scaling GitHub
holman
464
140k
Typedesign – Prime Four
hannesfritz
42
3k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.7k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
1.1k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.7k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.5k
Statistics for Hackers
jakevdp
799
230k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.3k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.2k
Transcript
deftype the taming of the Baishampayan “BG” Ghose @ghoseb Clojure/West
2012 Friday 16 March 12
@ghoseb helpshift.com Friday 16 March 12
@ghoseb helpshift.com I caught a dead mouse in the office
the other day Friday 16 March 12
MOTIVATION Friday 16 March 12
Friday 16 March 12
Friday 16 March 12
Maps Friday 16 March 12
Records Friday 16 March 12
Types Friday 16 March 12
TO SUMMARIZE Friday 16 March 12
deftype Performance Collection Abstractions Named Type Mutable Fields Full Control
Friday 16 March 12
defrecord Performance Collection Abstractions Named Type HashMap Semantics * Friday
16 March 12
maps Every other use-case Friday 16 March 12
IN SHORT Friday 16 March 12
Use Maps! Friday 16 March 12
Dive into deftype Friday 16 March 12
Use the source, Luke! Friday 16 March 12
IPersistentMap Seqable Associative IPersistentCollection ILookup Counted IFn IPersistentSet IObj Object
IMeta IPersistentStack Indexed IPersistentVector Friday 16 March 12
IPersistentMap Seqable Associative IPersistentCollection ILookup Counted IFn IPersistentSet IObj Object
IMeta IPersistentStack Indexed IPersistentVector Friday 16 March 12
Friday 16 March 12
Scaffold Friday 16 March 12
‘scaffold’ by Christophe Grand Friday 16 March 12
} Interface we want Ancestor interface Method sigs. . .
. . . . . Friday 16 March 12
bit.ly/clj-scaffold steal this code! Friday 16 March 12
A Note About IFn Holy arities, Batman! Friday 16 March
12
A Note About IFn Should implement all to avoid non-helpful
exception. Friday 16 March 12
MUTABLE TYPES Friday 16 March 12
^:volatile-mutable ^:unsynchronized-mutable atomic reads & writes a ‘vanilla’ Java mutable
field Friday 16 March 12
Friday 16 March 12
Printing Friday 16 March 12
clojure.core/print-method for humans Friday 16 March 12
clojure.core/print-dup for the reader Friday 16 March 12
#mylib.core.MyType[1,2,3] Object Literal Reader Syntax Friday 16 March 12
Factory Functions Friday 16 March 12
Hide Implementation Details Avoid Importing Java Classes Friday 16 March
12
(my-type :foo :bar) (import myns.MyType) (MyType. [:foo :bar]) vs. Friday
16 March 12
AN EXAMPLE IMPLEMENTATION (a weekend hack) Friday 16 March 12
bit.ly/clj-chainmap steal this code! Friday 16 March 12
Fin Friday 16 March 12
Friday 16 March 12