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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
270
The Postmodern Programmer
bg
0
100
The Roots of Go
bg
1
1.8k
On Solving Problems
bg
0
150
Other Decks in Programming
See All in Programming
レガシーPHP転生 〜父がドメインエキスパートだったのでDDD+Claude Codeでチート開発します〜
panda_program
0
1.1k
GNU Makeの使い方 / How to use GNU Make
kaityo256
PRO
16
5.6k
Agentic Elixir
whatyouhide
0
420
GitHubCopilotCLIをはじめよう.pdf
htkym
0
290
Don't Prompt Harder, Structure Better
kitasuke
0
790
SREに優しいTerraform構成 modulesとstateの組み方
hiyanger
2
150
PHP で mp3 プレイヤーを実装しよう
m3m0r7
PRO
0
290
運転動画を検索可能にする〜Cosmos-Embed1とDatabricks Vector Searchで〜/cosmos-embed1-databricks-vector-search
studio_graph
1
520
Terraform言語の静的解析 / static analysis of Terraform language
wata727
1
120
感情を設計する
ichimichi
5
1.6k
AI時代のPhpStorm最新事情 #phpcon_odawara
yusuke
0
230
The Monolith Strikes Back: Why AI Agents ❤️ Rails Monoliths
serradura
0
360
Featured
See All Featured
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
65
55k
Designing Powerful Visuals for Engaging Learning
tmiket
1
350
sira's awesome portfolio website redesign presentation
elsirapls
0
230
Being A Developer After 40
akosma
91
590k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
170
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
230
Music & Morning Musume
bryan
47
7.2k
Making Projects Easy
brettharned
120
6.6k
Utilizing Notion as your number one productivity tool
mfonobong
4
300
Chasing Engaging Ingredients in Design
codingconduct
0
180
Practical Orchestrator
shlominoach
191
11k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
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