6 ms·
PHP: A fractal of bad design (2012)
- AmazingTurtle 5y agoI used to laugh at this when I was in high school. This is so old and most of it is outdated. Please... Don't post those dead old links.
- unixhero 5y ago"Programming is a young profession." I beg to differ.
- gregjor 5y agoSome valid criticisms, but 9 years old and out of date. I think the mistake is thinking of PHP as “designed” as a language, rather than built to solve some real problems. More important is how well PHP works rather than how far away it falls from an imagined better-designed language. As Stroustrup quipped, there are two kinds of languages: Those everyone hates, and those no one uses.
- k__ 5y agoHe wasn't even right with that. Most people like the language they're using.
- boksiora 5y agoIf you think PHP is broken, have you tried JavaScript ?
- tlackemann 5y agoWilling to bet that the people who banter on about PHP are the same folks who install 'create-react-app' without question.
- kyriakos 5y agomaybe we should just conclude that quick to learn languages will always get popular even if they are nowhere perfect. JS is not perfect but its easy and available, same for PHP, basics can be learned in a day and you can have a working webapp in a week (especially with a framework like Laravel), on the other hand I wouldn't program a missile guidance system in it.
- zarzavat 5y agoThe PHP of today is now a fine house built on a terrible foundation. The warts from the original language are still there, but inexplicably they have decided to just soldier on and build a good language on top of them. For instance they've built a perfectly good object system with many advanced features; yet arrays, strings, etc aren't objects so you can't even call methods on them, they can only be manipulated by a dated, procedural API.
- NotSwift 5y agoAdding feature upon feature to a language that does not have a good foundation generally leads to disappointing results. My favorite examples are Javascript, Perl and C++.
- zarzavat 5y agoIt's especially a problem with dynamic languages, the lack of safe refactoring makes changing the language very difficult. Everybody learned the wrong lesson from the Python 3 debacle. The lesson everybody learned was "Big language changes are bad, don't do them". Whereas the lesson everybody should have learned was "Writing code in a dynamically typed language is like writing it in stone, it's really expensive to upgrade it later".
- kyriakos 5y agoI see no reason why arrays should be objects. PHP is not Java even if a lot has been borrowed from it over the years. Array manipulation and associative arrays in PHP are some of its strong points. Yes they are easy to abuse but they are also extremely flexible and make development fast.
- zarzavat 5y agoThere's no reason for arrays to be objects if PHP wants to be a procedural language like C. In the days of PHP4 it was a procedural language and that design made total sense. However nowadays nobody uses PHP as a procedural language, they use it as an object-oriented language. In that context it is extremely strange to have this procedural API still hanging around for "old" types.
- wolfium3 5y agohttps://blog.aurynn.com/2015/12/16-contempt-culture https://blog.aurynn.com/2015/12/16-contempt-culture ^^ Someone recently shared this article with me. Really made me think about my interaction with programmers using other languages.
- pachico 5y agoAgain? Please stop posting on this and, since you're at it, get over it!
- kyriakos 5y ago2012... 9 years passed a lot has changed. PHP still quite popular. Either this site needs to be updated or not posted.