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

2

u/dagguh2 Dec 02 '15 edited Dec 02 '15

PHP is completely changing their philosophy at least since version 5. Before it, PHP was a duck-typed language for creating home pages. It was perfect for its purpose, because it was easy, quick and dirty.

At some point, people started using it for full-blown applications. PHP maintainers decided to support these mad men and they've started transforming PHP to meet their needs. They're trying to make it look like Java, abandoning every original PHP design principle. It took years and it still cannot be even compared to Java, feature-wise and ecosystem-wise. It's a sad, pointless struggle.

65

u/[deleted] Dec 02 '15 edited Dec 02 '15

They're trying to make it look like Java, abandoning every original PHP design principle. It took years and it still cannot be even compared to Java, feature-wise and ecosystem-wise. It's a sad, pointless struggle.

The original PHP design principle was for it to be a basic template engine exposing C++ services. Things change in 20 years, who woulda thunk.

As for design principles "abandoned" since 5.x, I'm curious to hear what they are.

The renewed interest in dynamic languages that have optional typing and statically verifiable invariants is hardly unique to PHP. It's an industry trend. TypeScript is wildly popular in the JavaScript community. Python is getting typehints. Dart comes with typehints out of the box.

All dynamic languages are moving to have more static features, and all static languages are adding more dynamic features.

It's a normal process of convergence, and I agree it's a "struggle", but it's not a pointless one. We get better, more well-rounded languages as a result, which are more efficient and pleasant to work with, for a wider range of projects.

0

u/[deleted] Dec 02 '15

[deleted]

15

u/[deleted] Dec 02 '15

If you can point out a specific weakness of combining dynamic types with optional interfaces and typehints, then you have an argument. If not...

→ More replies (2)