Hacker News new | past | comments | ask | show | jobs | submit login

"Because uninitialized state is checked when accessing a property, you're able to create an object with an uninitialized property, even though its type is non-nullable."

This is going to result in a new series of run-time-only bugs that PHP is famous for. I love the language but it's 2019 and we should be past this. Also, where are the generics?




Ideally you'd get a compile error, but there is no compiler in PHP. Run time is the only time PHP can tell you there's a problem.


Generics will come in a major release. So probably in 8 along with the JIT compiler




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: