Russell (zimzat) wrote,

Consistency is key; Optimizing the wrong things

A lot of people like to claim that PHP is just slightly off in so many little ways it's hard to fully quantify why it's so bad in a convincing enough manner. I typically ignore this because every language has its inconsistencies, and the ones often picked on really are trivial, even in sum. Also, quite often people will say "PHP has X and Y inconsistent, yet [Language A] doesn't" and then follow up with "PHP has M and O inconsistent, yet [Language B] doesn't", yet where they fail is that [Language A] has M and O inconsistent while [Language B] has X and Y inconsistent (swap the language inconsistencies), or places where both [Language A] and [Language B] are inconsistent yet PHP isn't. Yes, plenty of little things are inconsistent if you look hard enough.

And then I find people who are making really bone-headed stupid coding standards in PHP and then I want to bash some heads in for giving PHP a bad name by their voluntary actions. Hard to read coding standards (No spaces between operators or anything? Are you serious?), inconsistent structuring (one line has 2 arguments, the next 3, the next 1, then next 2... recipe for hard to read code), inefficient designs (a constructor just to pass the __CLASS__ constant to the parent constructor? Seriously?), verbose nearly identical commands (if your class extensions recommend a code generator then there's something wrong...). So many little things quickly add up to something I cringe to think about, much less touch. Tout efficiency if you want, but that just screams incompetence and lack of true clarity to what makes things efficient (Minimizing the number of times you press the space bar is not efficiency!).

If you can tell which framework I'm talking about and want to defend it, don't bother. If you can't tell then be glad and I hope you never can. If you can tell and wish you couldn't then you have my sympathy.
Tags: php, programming
  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened