Since my day job is PHP-centric and I was already aware that PHP is awful, this is theoretically helpful to me, but oh lord, it makes my liver hurt. If I could get away with it, I'd never again trust my credit card number to a system based on PHP, but I suspect that that's about as easy as never trusting your credit card to an ATM/point-of-sale machine based on Windows.
PHP: A fractal of bad design
51–60 of 514 posts
Re: PHP: A fractal of bad design
#52My goal is to move away from PHP completely by 2013 for my websites. I've recently been toying around with various methods of tying C++ to a web frontend, with varying degrees of success. My current favorite method is to use mongoose to create a very simple HTTP interface for any C(++) project (mongoose is great!) and then use AJAX and JSON for any and all communication to and fro client and server. However, this lea…
I agree that statically typed languages have a lot of advantages but I can't see much reason to use C++ for anything if you have reasonable alternatives. Why not Scala or Haskell or even just plain old Java?
Re: PHP: A fractal of bad design
#53Earlier quoted context omitted.
Well, if you take the engineering analogy in a somewhat different direction, you end up with all the structures we ever created before we mastered statics and material sciences. Those bridges the Romans built were evolved patterns based on trial and error of previous designs, where the last design was the testing. Anyhow, just something to ponder about.
Those bridges weren't continually "enhanced" by slapping on more stone and wood (at least not the ones that remained standing for long). Each bridge was a fresh design, based on the best practices of the day. Kind of like new programming languages.
Re: PHP: A fractal of bad design
#54Re: PHP: A fractal of bad design
#55I completely agree with all of the author's points, but my day job is still PHP and I actually don't hate it so much now. That being said, it's nice to be able to sit on the most version of PHP and use awesome frameworks like FuelPHP and Laravel. I would not really consider doing anything besides nice CRUD app's in PHP though.
Frameworks can help a lot, but what PHP really needs is an equivalent to CoffeeScript that fixes all of these glaring issues with PHP.
Although there's issues with the PHP language implementation, the biggest problems are the enormous number of functions with quirky argument ordering that need to be understood by a developer before they're operating at full efficiency.
Re: PHP: A fractal of bad design
#56Re: PHP: A fractal of bad design
#57Don't complain about it, simply don't use it. The language seems to be good enough for some of the largest sites out there to use it as their primary langauge.
"Good enough" is not good enough. COBOL was "good enough" for many companies. We can do better, and we should try to.
Re: PHP: A fractal of bad design
#58The mind reels.
Re: PHP: A fractal of bad design
#59I got into the web space through WordPress and naturally progressed into learning PHP. There are times that I wish I could work with another language just as well as I can in PHP. I've attempted to learn Ruby. I know C++/C#/Java/Objective C. Yet I still come back to PHP. I can't explain it. I like PHP. I understand PHP. There are nice people willing to help me with PHP. PHP does what I ask. It's not the greatest. It'…
[deleted]
Re: PHP: A fractal of bad design
#60"preg_replace with the /e (eval) flag will do a string replace of the matches into the replacement string, then eval it." The mind reels.