5 ms·
Like Perl, PHP is a long-lived, heavily-used-in-production language, which means there is a lot of cruft that has accumulated over the years that's difficult fo
by smacktoward 13y ago
Like Perl, PHP is a long-lived, heavily-used-in-production language, which means there is a lot of cruft that has accumulated over the years that's difficult for the platform developers to just slough off. But much like there is a Modern Perl movement that has coalesced around voluntarily cutting out cruft and using a much cleaner, nicer-to-work-width subset of Perl, there is a similar movement in PHP-land that's doing the same thing.
PHP The Right Way (http://www.phptherightway.com/ http://www.phptherightway.com/) is a good place to start if you're curious what "modern PHP" looks like.
- forsaken 13y agoThose same arguments would apply to Python too, and it doesn't seem to have nearly as much cruft.
- smacktoward 13y agoTrue. But very few languages can claim to be as elegant as Python :-D
- anthonyb 13y agoWell, that was the parent's point: PHP, heavily used in production, godawful language. Perl, heavily used in production, godawful language, but at least it's not PHP. Python, heavily used in production, pretty good language most of the time. (It's refactoring effort is Python 3, but ended up not changing very much.)
- judk 13y agoJust ask a Go dev about how "elegant" they think Python is.
- deleted 13y ago[deleted]
- deleted 13y ago[deleted]
- GhotiFish 13y agoI would not call Go elegant. Simple maybe, but not elegant. It's not concise and it's not very powerful (concurrency aside(pun)).
- codygman 13y agoPython is elegant, and my first real commitment to a language, but imo nothing beats Haskell in elegance (though scheme has a certain beauty about it). Perhaps this is just me being temporarily enamored though, I can't help but to link to this post: http://www.xent.com/pipermail/fork/Week-of-Mon-20070219/044101.html http://www.xent.com/pipermail/fork/Week-of-Mon-20070219/0441... Haskell and I have been doing well so far in the "RealWorld" and I hope it keeps going that way :D If not, I'll probably put more time into python and C again.
- Pitarou 13y agoCan't disagree there. But, Monads are a huge hurdle and memory leaks are hard to fix. (Although I should add it's a few years since I've played with Haskell. Maybe things have moved on....)
- eru 13y agoMonads are a mostly a non-issue, once you understand them. The accidential memory leaks still exist.
- Pitarou 13y ago> Monads are a mostly a non-issue, once you understand them. I prefer to emphasise the "... once you understand them" bit.
- codygman 13y agoI personally don't feel that I've struggled with monads that much. Perhaps that was because I was okay with "I know how to use monads or wrestle them into getting something to work" (took 20 minutes) until I got to "I understand what monads are for, I understand how to compose them, and I can see how they aren't a hindrance and in many cases are useful." (has taken 4-5 months on/off learning). I haven't ran into memory issues yet, but I have heard others have a very hard time reasoning about memory/space leaks. However, something I hear less often is that the memory problems people have also happen in other languages.
- Killswitch 13y agoThis. Nobody taken seriously in PHP world doesn't use modern PHP tools, Good frameworks, Composer, follow PHP-FIG standards, all that stuff... Just because you had to maintain a PHP4 app 10 years ago, doesn't mean PHP hasn't changed. And it also doesn't mean real devs don't have standards and follow up-to-date guidelines.
- aaronbrethorst 13y agoI'm guessing you haven't spent that much time looking at the Wordpress ecosystem...there's some truly heinous stuff in there.
- dirktheman 13y agoTrue. But Wordpress is a blogging engine with tons of stuff bolted on to make it behave like a CMS. It appeals to the same group of people that disable error reporting to make their spaghetti code work. I do a lot of PHP programming. Frameworks like Laravel are a godsend. Sometimes I have to work on a Wordpress project and it makes me cry.
- benwerd 13y agoFor sure. WordPress has a lot of legacy backwards compatibility on its shoulders. If they could shrug it off and start again, I'm sure it would be a lot cleaner. The project I'm working on (https://github.com/idno/idno https://github.com/idno/idno) is PHP, but explicitly doesn't support legacy versions, in order to rule out the way of working that was finally made obsolete in v5.3. I'm very happy with the language, and I can usually express what I need simply. Reflection could use a little love, mind you.
- girvo 13y agoI'm building some projects that are only targeted at 5.5 -- once you do that, and stick to all the PSR standards, then it's actually really nice, super productive, and the cruft that exists gets ignored. I like PHP still shrugs