Intro to Hack
Kyle Ferguson
@kylegferg
docs.hhvm.com
Hack
- Programming language for HHVM
- Evolved from PHP
Benefits
- Created by Facebook, open source
- If you know PHP, you know Hack
- Easy to adopt (even w/ existing code base)
-...
PHP (dynamic)
- Rapid development cycle
- Easily deployed
- Highly available
Java/C++ (static)
- Disciplined
- Scales bett...
Introducing Hack
What gets “typed”
Members
Parameters
Returns
Types
Primitive: string, int, bool, array
Nullable: ?string, ?FooInterface
Cl...
Modes
Partial (default)!
!
- Nothing is *required* to have types defined
- Allows for incremental adoption
Strict!
!
- EVER...
Unpredictable code is DANGEROUS
Hack provides a *more* predictable PHP
Migrating
Migrating
Migrating
Migrating
Migrating
Migrating
Tools / Help
Documentation docs.hhvm.com
Editor plugins: Vim, Emacs
Example Site: github.com/hhvm/hack-example-site
Dev En...
Upcoming SlideShare
Loading in...5
×

Intro to Hack Language

1,478

Published on

What is Hack, why should you care, and how to get started.

1 Comment
1 Like
Statistics
Notes
  • Sorry the code previews are so dark and small, they were much more readable on my machine and exported a little funny.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total Views
1,478
On Slideshare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
8
Comments
1
Likes
1
Embeds 0
No embeds

No notes for slide

Intro to Hack Language

  1. 1. Intro to Hack Kyle Ferguson @kylegferg docs.hhvm.com
  2. 2. Hack - Programming language for HHVM - Evolved from PHP
  3. 3. Benefits - Created by Facebook, open source - If you know PHP, you know Hack - Easy to adopt (even w/ existing code base) - Language additions (generics, collections, etc.)
  4. 4. PHP (dynamic) - Rapid development cycle - Easily deployed - Highly available Java/C++ (static) - Disciplined - Scales better Goals for Hack
  5. 5. Introducing Hack
  6. 6. What gets “typed” Members Parameters Returns Types Primitive: string, int, bool, array Nullable: ?string, ?FooInterface Classes: Validator, FooInterface Other: mixed, void, this Also see: closures, collections, generics, constraints Tuples: (string, int)
  7. 7. Modes Partial (default)! ! - Nothing is *required* to have types defined - Allows for incremental adoption Strict! ! - EVERYTHING must be typed Decl! ! - Allows “Strict” code to work with legacy code - Always avoid this mode if possible
  8. 8. Unpredictable code is DANGEROUS Hack provides a *more* predictable PHP
  9. 9. Migrating
  10. 10. Migrating
  11. 11. Migrating
  12. 12. Migrating
  13. 13. Migrating
  14. 14. Migrating
  15. 15. Tools / Help Documentation docs.hhvm.com Editor plugins: Vim, Emacs Example Site: github.com/hhvm/hack-example-site Dev Environment: github.com/senary/harbor
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×