Hacker News new | ask | show | jobs
by tabbyjabby 5291 days ago
Look, there are a number of criticisms of PHP that the language definitely deserves, but I'm not sure if you've hit on any of the legitimate ones.

the outright necessity of shit like call-by-name loses what little error-checking you can otherwise get

I'm sorry, but I use PHP everyday, and I rarely find myself needing to use call-by-name, except when it is required by internal functions. Many internal PHP functions that manipulate arrays do require the arrays to be passed by reference, but this doesn't prevent unit testing or error checking at all. I can't find any validity in this complaint and am assuming it is more problem of your coding style than an error inherent in PHP's language design.

the solution to any data storage problem seems to be "MORE ARRAYS!"

Brilliant observation. This is because arrays in PHP do double or even triple duty. They can be simple number-indexed arrays, they can be associative arrays, and they are internally implemented as hash tables, so they can also act as hash tables. Is your problem a semantic one or one of functionality?

PHP is a tool where a sufficiently advanced developer finds themselves fighting it as much as using it, and that is a shame.

Sorry I can't be as advanced as you.