Re: [RFC] [Discussion] Bound-Erased Generic Types

From: Date: Tue, 12 May 2026 12:01:44 +0000
Subject: Re: [RFC] [Discussion] Bound-Erased Generic Types
References: 1 2 3 4 5 6 7 8  Groups: php.internals 
Request: Send a blank email to internals+get-130849@lists.php.net to get a copy of this message
Hi Rowan, > When people talk about their experience with erased generics in Hack, they're talking > about their experience of universal use of that tool. > > I don't think you can apply that experience to a situation where the majority of users of > the language have no such tool. hh_client isn't structurally different from PHPStan, Psalm, or Mago. You can run hhvm bad_file.hack without ever invoking it, and Hack has third-party static-analysis too ( Hakana, for example: https://github.com/slackhq/hakana). The only difference is that hh_client ships in the same tarball as the runtime instead of in a Composer package. The more important point is who's actually in the population the Hack experience describes. Matt's quote is about Slack engineers, and Slack adopted Hack because they wanted static analysis. The people whose experience he's describing are those who chose to engage with the tool, exactly the same population as PHP developers who choose to run PHPStan or Psalm or Mago or Phan today. Bundling changes where the tool originates doesn't change who reaches for it. The audience for native generics is the same audience that already uses docblock generics, which is the same audience that already runs SA. That audience exists in PHP today, voluntarily, without bundling. Their experience of erased generics in PHP will match Slack's experience of erased generics in Hack, because they're the same kind of user with the same tooling discipline. Cheers, Seifeddine.

« previous php.internals (#130849) next »