Brent 9/17/2020

The case for transpiled generics in PHP

Read Original

The article presents a case for adding generic syntax to PHP that would be ignored by the runtime interpreter but used by static analysis tools like Psalm and PHPStan. It argues that since runtime generics impact performance, a transpiled approach—similar to TypeScript in JavaScript—could meet developer demand for stronger type safety without sacrificing speed.

The case for transpiled generics in PHP

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week

1
The Beautiful Web
Jens Oliver Meiert 2 votes
2
Container queries are rad AF!
Chris Ferdinandi 2 votes
4
LLM Use in the Python Source Code
Miguel Grinberg 1 votes
5
Wagon’s algorithm in Python
John D. Cook 1 votes