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
Know Your Types
Search
Michael Bernstein
June 21, 2014
Technology
5
2.9k
Know Your Types
GoRuCo 2014
Michael Bernstein
June 21, 2014
Tweet
Share
More Decks by Michael Bernstein
See All by Michael Bernstein
I'd like to introduce you to a few of my closest friends
mrb
1
4.8k
Papers We Love NYC: "Propositions As Types" By Philip Wadler
mrb
1
1.7k
Compiling a Dependently Typed Language to Ruby
mrb
3
220
Programs That Eat Programs
mrb
2
1.3k
The Art of Obsession
mrb
3
850
The Research Omphalos
mrb
1
270
Papers We Love: "A Unified Theory of Garbage Collection"
mrb
4
2.3k
Distributed Systems Archaeology
mrb
22
3.1k
GoRuCo 2013
mrb
11
5k
Other Decks in Technology
See All in Technology
組織全体で実現する標準監視設計
yuobayashi
2
480
Claude Codeが爆速進化してプラグイン追従がつらいので半自動化した話 ver.2
rfdnxbro
0
490
新職業『オーケストレーター』誕生 — エージェント10体を同時に回すAgentOps
gunta
4
1.8k
親子 or ペアで Mashup for the Future! しゃべって楽しむ 初手AI駆動でものづくり体験
hiroramos4
PRO
0
100
身体を持ったパーソナルAIエージェントの 可能性を探る開発
yokomachi
1
100
「Blue Team Labs Online」入門 - みんなで挑むログ解析バトル
v_avenger
0
150
[JAWSDAYS2026][D8]その起票、愛が足りてますか?AWSサポートを味方につける、技術的「ラブレター」の書き方
hirosys_
3
120
Claude Codeの進化と各機能の活かし方
oikon48
21
12k
スクリプトの先へ!AIエージェントと組み合わせる モバイルE2Eテスト
error96num
0
150
[JAWS DAYS 2026]私の AWS DevOps Agent 推しポイント
furuton
0
140
8万デプロイ
iwamot
PRO
2
230
クラウド × シリコンの Mashup - AWS チップ開発で広がる AI 基盤の選択肢
htokoyo
2
180
Featured
See All Featured
Into the Great Unknown - MozCon
thekraken
40
2.3k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
270
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
300
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
BBQ
matthewcrist
89
10k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
390
Measuring & Analyzing Core Web Vitals
bluesmoon
9
780
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
940
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
110
Transcript
Know Your Types Michael R. Bernstein June 2014 Gotham Ruby
Conference, NYC w michaelrbernste.in t @mrb_bk
I’m Obsessed
None
What Are Types?
“What we talk about when we talk about types” Benton,
2014
“We don't talk about types, we argue about them.”
“Type Systems” Cardelli, 1996
None
Computer Science Skill 0 25 50 75 100 Homepage Design
Outdatedness Computer Science Skill vs. Homepage Design Outdatedness
Computer Science Skill 0 25 50 75 100 Homepage Design
Outdatedness Bernstein’s Law
“A collection of values. An estimate of the collection of
values that a program fragment can assume during program execution.” Type
int bool string int -> bool
“A component of a type system. A rule stating the
conditions under which a particular program construct will not cause forbidden errors.” Type Rule
None
“A collection of type rules for a typed programming language.
Same as static type system.” Type System
None
“A language where good behavior is determined before execution.” Statically
checked language
“A language where good behavior is enforced during execution.” Dynamically
checked language
“The process of checking a program before execution to establish
its compliance with a given type system and therefore to prevent the occurrence of forbidden errors.” Typechecking
“The process of finding a type for a program within
a given type system.” Type Inference
How Can Types Help Us?
“Propositions as Types” Wadler, 2014
None
None
Isomorphism
iso morph
equal shape
Propositions are Types
None
Proofs are Programs
Normalization of proofs is evaluation of programs
None
None
None
None
None
Deep Understanding
Mathematical Certainty
Enlightenment
“Types and Programming Languages” a.k.a ‘TAPL’ Pierce, 2002
Detecting Errors
Abstraction
Documentation
Safety
So Much More!
Types and Ruby (But Really Dynamic Languages in General)
“A Practical Optional Type System for Clojure” Bonnaire-Sergeant,2012
None
“Typed Scheme: From Scripts to Programs” Tobin-Hochstadt, 2010
“Gradual Typing for Functional Languages” Siek & Taha, 2006
Gradual Typing
“…safe interoperability between typed and untyped portions of a single
program” ! - Sam Tobin-Hochstadt
“Dynamic Inference of Static Types for Ruby” An, Chaudhuri, Foster,
Hicks, 2011
“…constraint-based dynamic type inference, a technique that infers static types
based on dynamic program executions.”
None
“The Ruby Type Checker” Ren, Toman, Strickland, Foster 2013
“RTC is designed so programmers can control exactly where type
checking occurs: type-annotated objects serve as the “roots” of the type checking process, and unan- notated objects are not type checked.”
None
Challenges
“Experience from Developing the Dialyzer: A Static Analysis Tool Detecting
Defects in Erlang Applications” Sagonas, 2005
“…testing, no matter how thorough, cannot of course detect all
software defects. Tools that complement testing, such as static analyzers, have their place in software development regardless of language.”
Conclusions
Types and Type Systems Are Really, Really Cool
Types Are A Prism
A Type System Can Be A Guide
Let’s Push It Forward
Thank You w michaelrbernste.in t @mrb_bk