Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

A Tour of New Hack Language and Library Features

Meta via YouTube

Overview

Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Explore new features added to Hack, including generics, short lambda syntax, and the Collections API in this comprehensive talk from Meta's Hack Dev Day. Dive into type annotations at runtime, PHP closure expressions, Hack lambda expressions, and their benefits. Examine Hack Collections, static typing, immutable collections, and async/await functionality. Learn about constructor promotion, trailing commas, error detection in traits, and trait interfaces. Gain insights into future directions for Hack development from software engineers Drew Paroski and Eugene Letuchy.

Syllabus

Intro
Type Annotations at Run Time
PHP Closure Expressions
Hack Lambda Expressions
Benefits of Lambda Expressions
More Examples
Hack Collections
map/filter example
Design
array_merge() example
Downsides of one-size-fits-all
Static Typing
PHP arrays have value-type semantics
Immutable Collections
Code example: Sync = Async
Awaitable
Parallel async/await
Mid-execution
Entering async
Goodies!: Constructor Promotion
Goodies!: Trailing Commas
Detecting Errors in Traits
Trait requirements: solution
Goodies!: Trait Interfaces
Future Directions

Taught by

Meta Developers

Reviews

Start your review of A Tour of New Hack Language and Library Features

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.