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
110
0
Share
Hack - Why Should I Care?
version given at Nomad PHP EU in April 2015
Joel Clermont
April 23, 2015
More Decks by Joel Clermont
See All by Joel Clermont
How to get unstuck
jclermont
0
190
Level Up Your Code Quality
jclermont
0
380
How to Save Time
jclermont
0
50
F# Type Providers
jclermont
0
110
Give Elm a Chance! (that conference)
jclermont
0
340
Give Elm a Chance (newCodeCamp)
jclermont
0
320
Give Elm a Chance!
jclermont
0
340
Property-based testing: work harder, not smarter
jclermont
0
480
Elm - A new approach to building the front end
jclermont
0
450
Other Decks in Programming
See All in Programming
SPMマルチモジュールで テストカバレッジを取得する技法
yosshi4486
0
130
Copilot CLI の継戦能力を高める コンテキスト管理
nozomutu
1
1.1k
AI時代になぜ書くのか
mutsumix
0
470
Modding RubyKaigi for Myself
yui_knk
0
540
タクシーアプリ『GO』の バックエンド開発のおける AI利活用と若者のすべて
pyama86
3
1.7k
Technical Debt: Understanding it Rightly, Engaging it Rightly #LaravelLiveJP
shogogg
0
160
TypeSpec で繋ぐ複数プロダクトの型安全
maroon8021
1
260
RailsTokyo 2026#4: AI様があれば、 Hotwireの弱点は消えるか?
naofumi
5
1k
デフォルト運用のCodeRabbit、1年で何が変わったか / How CodeRabbit Changed Our Code Review in 1 Year
bake0937
1
110
These Five Tricks Can Make Your Apps Greener, Cheaper, & Nicer
hollycummins
0
230
Transactional Change Stream Processing With Debezium and Apache Flink
gunnarmorling
1
140
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
450
Featured
See All Featured
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
340
SEO for Brand Visibility & Recognition
aleyda
0
4.6k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.4k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.8k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
590
Optimizing for Happiness
mojombo
378
71k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
240
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.7k
Context Engineering - Making Every Token Count
addyosmani
9
920
Game over? The fight for quality and originality in the time of robots
wayneb77
1
180
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.6k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
410
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