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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Michael Bernstein
June 21, 2014
Technology
3k
5
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Know Your Types
GoRuCo 2014
Michael Bernstein
June 21, 2014
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.9k
Papers We Love NYC: "Propositions As Types" By Philip Wadler
mrb
1
1.8k
Compiling a Dependently Typed Language to Ruby
mrb
3
230
Programs That Eat Programs
mrb
2
1.4k
The Art of Obsession
mrb
3
880
The Research Omphalos
mrb
1
290
Papers We Love: "A Unified Theory of Garbage Collection"
mrb
4
2.3k
Distributed Systems Archaeology
mrb
22
3.1k
GoRuCo 2013
mrb
11
5.1k
Other Decks in Technology
See All in Technology
AI時代におけるエンジニアの新たな役割──FDEとクオリアの探求/登壇資料(戸井田 裕貴)
hacobu
PRO
0
130
個人開発で育てる「大規模設計の苗床」 - AI時代の1人開発から始める業務への知識接続 / The Seedbed for Large-Scale Design - From AI-Era Solo Projects to Professional Knowledge
bitkey
PRO
1
300
CDKで書くECSのベストプラクティス、 改めて考え直す2026 #cdkconf2026
makies
3
890
アップデートで何が変わった?デモで学んで使いこなすIBM Bob2.0
muehara
0
200
ソニー銀行におけるビジネスアジリティ向上のためのクラウドシフト戦略
srenext
0
950
シンガポールで登壇してきます
yama3133
0
300
設計レビューとAIハーネスで向き合う AIが生み出した新しいボトルネックの対処法 / Design Reviews and AI Harnesses Against New Bottlenecks Created by AI
nstock
1
220
Gen3R: 3D Scene Generation Meets Feed-Forward Reconstruction
spatial_ai_network
0
140
Alphaモジュール使っていいのかい!?いけないのかい!?どっちなんだいっ!?
watany
1
300
Making sense of Google’s agentic dev tools
glaforge
1
300
SRE本の知られざる名シーン / The Hidden Gems of Google SRE Book
nari_ex
2
440
しくみを学んで使いこなそう GitHub Copilot app
torumakabe
2
300
Featured
See All Featured
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
We Have a Design System, Now What?
morganepeng
55
8.2k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
470
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Evolving SEO for Evolving Search Engines
ryanjones
0
240
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.3k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
65
57k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Code Reviewing Like a Champion
maltzj
528
40k
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