r/programming • • Dec 02 '15

PHP 7 Released

https://github.com/php/php-src/releases/tag/php-7.0.0
887 Upvotes

729 comments sorted by

View all comments

12

u/everywhere_anyhow Dec 02 '15

It must be said:

/r/lolphp

And yet, PHP is huge. Software developers should take note of this really important effect. Elegance and good design matter to some of us, but at the end of the day it's about making shit work, and you don't have to be elegant or well designed to meet that bar.

"Making shit work" is 99% of the game.

9

u/SwabTheDeck Dec 02 '15

Honestly, "making shit work" is an area in which PHP excels. I've been writing PHP, Obj-C, and JS professionally for the past few years, and PHP offers the most opportunities for quick-and-dirty solutions by far. I haven't decided whether this is good or bad, but at least it's an option when time or frustration is against you.

That said, if you're using a decent framework and following the proper patterns, PHP can be nearly as elegant as any other mainstream language. I think the reason you see so much crappy code out there is because PHP has a huge developer base and what tends to happen is that tiny, simple websites keep getting extended far beyond what their basic design could accommodate.

3

u/everywhere_anyhow Dec 02 '15

PHP offers the most opportunities for quick-and-dirty solutions by far. I haven't decided whether this is good or bad, but at least it's an option when time or frustration is against you

I felt the same way about perl for the longest time.

The engineering community has a lot of history with "quick and dirty" and the trade-offs are clear. Quick and dirty is a good thing for short-term needs where long-term maintenance is not expected. So when the overriding pressures are time and frustration, quick and dirty alleviates those pressures, so as far as that goes, quick and dirty is good.

Long term, it's pain, pain, pain. This does not mean you should never do it quick and dirty. Just that you should avoid being in a role where you have to extend or maintain quick and dirty for an extended period of time. It's painful, no matter PHP, perl, or anything else.

27

u/Milyardo Dec 02 '15

You say that as if better designed platforms don't work, or work less well.

11

u/boerema Dec 02 '15

I think he says that as if PHP works just fine for a myriad of applications and is very simple to get serving pages. When you need to get that simple form hosted that takes in votes and poops them out into a file quick, PHP isn't a bad choice for expediency and simplicity. And almost any C++ programmer can write it without training.

→ More replies (1)

15

u/mandreko Dec 02 '15

An old software developer once told me, "Delivery is a feature"

→ More replies (2)

17

u/[deleted] Dec 02 '15

and you don't have to be elegant or well designed to meet that bar.

You're saying this as if this is somehow PHP's philosophy.

PHP supports a big chunk of legacy, so modernizing is hard, and it's a long-term process, but every new release drops more of the legacy cruft and replaces it with features and APIs that actually are elegant and well designed.

You're defending PHP using arguments that would be applicable 20 years ago for PHP4.

→ More replies (3)

2

u/andyjonesx Dec 03 '15

I know some really good developers who seem to not realise that being quick to market with a working product is also extremely important. It doesn't matter if every single little part of the system can be replaced/extended/reused (even though chances are they won't be for a long time) if you're not first to market, you go over budget, and you risk delivery.

Say that to them, though, and you're trying to rush it and ruin everything with your bad practice.

→ More replies (21)