DEV Community

Discussion on: PHP needs its own ES6

Collapse
 
johannestegner profile image
Johannes

At the least, generics would allow us to create our own array classes with generic strict types and I would bet that projects like symphony (which have a quite good robust collection implementation) would use this in the future. I am really hoping for generics in 7.4, as it is one of the most useful features in a "real" typed language! :)

Collapse
 
aleksikauppila profile image
Aleksi Kauppila

Unfortunately AFAIK there's no signs yet of generics being implemented in PHP. There is an RFC for generics targeting PHP 7.1, but i don't know if it's still active. Maybe in PHP 8?

Thread Thread
 
johannestegner profile image
Johannes

Aye, I have seen the RFC and I do hope that it is picked up before 8.x. Seeing how much that have changed in the 7.x versions (and especially seeing even harder "types" in 7.4) I do feel that it would not be impossible to see the RFC picked up in 7.4 or 7.5. I do hope so, but I'm not holding my breath! hehe

Either way, the additions in each new minor version of the 7.x releases have given me much joy! :)