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
130
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
200
Level Up Your Code Quality
jclermont
0
400
How to Save Time
jclermont
0
57
F# Type Providers
jclermont
0
120
Give Elm a Chance! (that conference)
jclermont
0
350
Give Elm a Chance (newCodeCamp)
jclermont
0
340
Give Elm a Chance!
jclermont
0
340
Property-based testing: work harder, not smarter
jclermont
0
490
Elm - A new approach to building the front end
jclermont
0
460
Other Decks in Programming
See All in Programming
改善しないと、タスクが回らない。 “てんこ盛りポジション” を引き継いだ情シスの、入社3ヶ月の業務改善録
krm963
0
240
Claude Team Plan導入・ガイド
tk3fftk
0
250
PostgreSQL 18で考えるUUID主キー
kazuhiro1982
0
450
今さら聞けない .NET CLI
htkym
0
170
言語を使う側から、作る側へ。 自作 Lisp で得た新たな気づき。
andpad
0
140
Welcome to the "Parametricity" 🏙️ − Generic だけど Specific な世界 −
guvalif
PRO
1
200
React本体のコードリーディング
high_g_engineer
1
130
TSX の <Hoge<Fuga>> という構文に驚いた話 / tsx-type-argument-syntax
kanaru0928
0
200
変わらないものが、変わるものを決める — 意図駆動開発 × イベントソーシング × イミュータブル | What Doesn't Change Decides What Can — IDD × Event Sourcing × Immutability
tomohisa
0
1k
型も通る、synthも通る、それでも危ない 〜AIのCDKの権限とコストを機械で検証する〜 / It Passes Type Checks, It Passes Synth Checks, but It’s Still Risky — Automatically Verifying Permissions and Costs in AI’s CDK —
seike460
PRO
1
510
ドリフトを絶対に許さない(?)CDK運用 / CDK Ops with Zero Tolerance for Drifts (?)
akihisaikeda
1
150
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
420
Featured
See All Featured
Testing 201, or: Great Expectations
jmmastey
46
8.2k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
230
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
520
Fashionably flexible responsive web design (full day workshop)
malarkey
408
67k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
340
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
920
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
200
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
280
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
420
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
Designing Powerful Visuals for Engaging Learning
tmiket
1
470
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