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