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

Why, when "rebooting" PHP, do you still keep the inane non-object arrays? Why not either/both create a syntax for manipulating arrays, or promote arrays to objects with their own methods.

When I see special functions which exist to do basic array-as-list operations, like his `add()` function, my eyes roll. Then I see arbitrary, inconsistent use of the dollar sign to indicate variables and they start to bleed -- you either have a dollar sign or not, but pick one and make it work.

When the language designer adds features at whim, without considering whether or not his implementation is keeping consistency or breaking it, well that's how you get a language like PHP in the first place!




what might make sense is to only implement the SPL stuff, and force all array access to be objects implementing the SPL interfaces. it would hurt 'ease of use' compatibility, but would enforce as a standard something that's already defined in PHP.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: