Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> PHP seems to treat them as entirely differerent types, which leads to something like "calling a method on it" being a technical impossibility in the current architecture.

Most platforms treat scalars as entirely different types at some level and then paper over the differences. As for the PHP architecture, I've actually looked into this, and it would take only one small change to the method-call code to add methods to scalars. In fact, the design of PHP makes this surprisingly easy to add.



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

Search: