Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
86
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
170
Level Up Your Code Quality
jclermont
0
360
How to Save Time
jclermont
0
38
F# Type Providers
jclermont
0
95
Give Elm a Chance! (that conference)
jclermont
0
310
Give Elm a Chance (newCodeCamp)
jclermont
0
300
Give Elm a Chance!
jclermont
0
310
Property-based testing: work harder, not smarter
jclermont
0
460
Elm - A new approach to building the front end
jclermont
0
430
Other Decks in Programming
See All in Programming
Microservices Platforms: When Team Topologies Meets Microservices Patterns
cer
PRO
1
760
チーム開発の “地ならし"
konifar
8
6.6k
関数実行の裏側では何が起きているのか?
minop1205
1
370
WebRTC と Rust と8K 60fps
tnoho
2
1.6k
大体よく分かるscala.collection.immutable.HashMap ~ Compressed Hash-Array Mapped Prefix-tree (CHAMP) ~
matsu_chara
1
190
最新のDirectX12で使えるレイトレ周りの機能追加について
projectasura
0
330
「文字列→日付」の落とし穴 〜Ruby Date.parseの意外な挙動〜
sg4k0
0
330
Micro Frontendsで築いた 共通基盤と運用の試行錯誤 / Building a Shared Platform with Micro Frontends: Operational Learnings
kyntk
1
1.7k
TypeScriptで設計する 堅牢さとUXを両立した非同期ワークフローの実現
moeka__c
6
2.8k
Google Antigravity and Vibe Coding: Agentic Development Guide
mickey_kubo
2
110
AIと協働し、イベントソーシングとアクターモデルで作る後悔しないアーキテクチャ Regret-Free Architecture with AI, Event Sourcing, and Actors
tomohisa
5
15k
Evolving NEWT’s TypeScript Backend for the AI-Driven Era
xpromx
0
230
Featured
See All Featured
4 Signs Your Business is Dying
shpigford
186
22k
Reflections from 52 weeks, 52 projects
jeffersonlam
355
21k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
Designing Experiences People Love
moore
142
24k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
A Modern Web Designer's Workflow
chriscoyier
697
190k
GraphQLとの向き合い方2022年版
quramy
49
14k
Into the Great Unknown - MozCon
thekraken
40
2.2k
GraphQLの誤解/rethinking-graphql
sonatard
73
11k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Context Engineering - Making Every Token Count
addyosmani
9
450
Navigating Team Friction
lara
191
16k
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