Keynote - Hacklang at Slack - Keith Adams - php[tek] 2017

Опубликовано: 23 Октябрь 2024
на канале: php[architect]
1,657
30

Hack extends the PHP language with a gradual typing system. It allows large PHP codebases to introduce powerful, flexible type assurances incrementally, one file or even one function declaration at a time. Unlike PHP 5 and 7’s long-standing typehint mechanisms, Hack checks type invariants soundly ahead of time, before running the code. Slack has recently begun migrating its large PHP codebase to Hacklang, with a goal of reducing defect density, and increasing the confidence and velocity of changes. I’ll introduce the Hack language, narrate Slack’s experience in migrating to it, and offer some lessons learned for others contemplating the switch.