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
Hack - Why Should I Care?
Search
Joel Clermont
April 23, 2015
Programming
0
84
Hack - Why Should I Care?
version given at Nomad PHP EU in April 2015
Joel Clermont
April 23, 2015
Tweet
Share
More Decks by Joel Clermont
See All by Joel Clermont
How to get unstuck
jclermont
0
160
Level Up Your Code Quality
jclermont
0
350
How to Save Time
jclermont
0
37
F# Type Providers
jclermont
0
93
Give Elm a Chance! (that conference)
jclermont
0
300
Give Elm a Chance (newCodeCamp)
jclermont
0
300
Give Elm a Chance!
jclermont
0
310
Property-based testing: work harder, not smarter
jclermont
0
450
Elm - A new approach to building the front end
jclermont
0
430
Other Decks in Programming
See All in Programming
GitHub Copilotを使いこなせ!/mastering_github_copilot!
kotakageyama
2
820
SwiftDataを使って10万件のデータを読み書きする
akidon0000
0
250
Dive into Triton Internals
appleparan
0
460
Blazing Fast UI Development with Compose Hot Reload (droidcon London 2025)
zsmb
0
480
ノーコードからの脱出 -地獄のデスロード- / Escape from Base44
keisuke69
0
620
CSC305 Lecture 13
javiergs
PRO
0
380
CSC509 Lecture 08
javiergs
PRO
0
280
Temporal Knowledge Graphで作る! 時間変化するナレッジを扱うAI Agentの世界
po3rin
5
1.2k
Making Angular Apps Smarter with Generative AI: Local and Offline-capable
christianliebel
PRO
0
110
マンガアプリViewerの大画面対応を考える
kk__777
0
460
予防に勝る防御なし(2025年版) - 堅牢なコードを導く様々な設計のヒント / Growing Reliable Code PHP Conference Fukuoka 2025
twada
PRO
30
9.1k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
570
Featured
See All Featured
jQuery: Nuts, Bolts and Bling
dougneiner
65
8k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
658
61k
Optimising Largest Contentful Paint
csswizardry
37
3.5k
Code Reviewing Like a Champion
maltzj
527
40k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Into the Great Unknown - MozCon
thekraken
40
2.1k
Making Projects Easy
brettharned
120
6.4k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
192
56k
Building Adaptive Systems
keathley
44
2.8k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
2
300
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.8k
It's Worth the Effort
3n
187
28k
Transcript
Hack Why Should I Care? Joel Clermont @jclermont
What to expect • No insider secrets
What to expect • No insider secrets • High-level tour
of Hack’s unique features
What to expect • No insider secrets • High-level tour
of Hack’s unique features • Make the case why you should try it out
What to expect • No insider secrets • High-level tour
of Hack’s unique features • Make the case why you should try it out • Show you how to get started
What to expect • No insider secrets • High-level tour
of Hack’s unique features • Make the case why you should try it out • Show you how to get started • Answer all your questions
Quick Tour of Hack
Type Annotations
Type Annotations
Type Annotations
Type Annotations Where do we need them?
Type Annotations Where do we need them? 1
Type Annotations Where do we need them? 1 2
Type Annotations Where do we need them? 1 2 3
Type Annotations Where do we need them? 1 2 3
Type Annotations Where do we need them?
Type Annotations What do we get out of it? •
Easier for developers to understand intent
Type Annotations What do we get out of it? •
Easier for developers to understand intent • Correctness of our type system
Type Annotations What do we get out of it? •
Easier for developers to understand intent • Correctness of our type system • Easier to refactor
Doesn’t PHP already have type hints?
Doesn’t PHP already have type hints? • Scalar type hints
Doesn’t PHP already have type hints? • Scalar type hints
• Typed arrays
Doesn’t PHP already have type hints? • Scalar type hints
• Typed arrays • Nullable types
Doesn’t PHP already have type hints? • Scalar type hints
• Typed arrays • Nullable types • Function return type hints
Doesn’t PHP already have type hints? • Scalar type hints
• Typed arrays • Nullable types • Function return type hints • Type checker
More useful Hack types
More useful Hack types
More useful Hack types
More useful Hack types
More useful Hack types
Questions?
Still not convinced? DEMO
What’s wrong?
What’s wrong?
What’s wrong?
What’s wrong?
What’s wrong?
Solution 1
Solution 2
Solution 3
What’s wrong?
None
Solution
Questions?
More Cool Features
Lambdas
Lambdas
Lambdas
Lambdas
Collections Why would I need anything besides an array?
Collections Anyone know what this is?
Collections Hack gives us the right tool for each job
Collections Cleaner API
Collections Other nice features • Familiar interface
Collections Other nice features • Familiar interface • OutOfBoundsException
Collections Other nice features • Familiar interface • OutOfBoundsException •
Collections are objects (no more passing by ref)
Collections Other nice features • Familiar interface • OutOfBoundsException •
Collections are objects (no more passing by ref) • Immutable collections too
Trailing Commas You know you want them
And more . . . • User attributes • Enhancements
to traits • Async / await • Constructor promotion • Shapes • Type aliases . . . .
Questions?
Why should you consider it? Safety Language Features (Developer) Speed
Trying out Hack is not scary • Gradual process
Trying out Hack is not scary • Gradual process •
Full PHP interoperability
Trying out Hack is not scary • Gradual process •
Full PHP interoperability • Not just for multi-million line codebases
Trying out Hack is not scary • Gradual process •
Full PHP interoperability • Not just for multi-million line codebases • Awesome tooling
How to get started • Install HHVM (packages available)
How to get started • Install HHVM (packages available) •
Convert existing code with hackificator
How to get started • Install HHVM (packages available) •
Convert existing code with hackificator • Monitor logs for type errors
How to get started • Install HHVM (packages available) •
Convert existing code with hackificator • Monitor logs for type errors • Harden your types over time
Resources • Conversion guide http://docs.hhvm.com/manual/en/install.hack.conversion.php • HHVM blog http://hhvm.com/blog •
IRC channel #hhvm • http://hhvm.com/frameworks/ • https://github.com/facebook/hhvm/wiki/Extensions
grumpy-learning.com
Questions? @jclermont https://joind.in/talk/view/14452
Feedback please @jclermont https://joind.in/talk/view/14452
Thank you! @jclermont https://joind.in/talk/view/14452