2 ms·
PHP is basically the latest example of "Worse is better"(http://en.wikipedia.org/wiki/Worse_is_better http://en.wikipedia.org/wiki/Worse_is_better). ---- Simp
by narrator 14y ago
PHP is basically the latest example of "Worse is better"(http://en.wikipedia.org/wiki/Worse_is_better http://en.wikipedia.org/wiki/Worse_is_better).
----
Simplicity:
The design must be simple, both in implementation and interface. It is more important for the implementation to be simple than the interface. Simplicity is the most important consideration in a design.
Correctness:
The design must be correct in all observable aspects. It is slightly better to be simple than correct.
Consistency:
The design must not be overly inconsistent. Consistency can be sacrificed for simplicity in some cases, but it is better to drop those parts of the design that deal with less common circumstances than to introduce either complexity or inconsistency in the implementation.
Completeness:
The design must cover as many important situations as is practical. All reasonably expected cases should be covered. Completeness can be sacrificed in favor of any other quality. In fact, completeness must be sacrificed whenever implementation simplicity is jeopardized. Consistency can be sacrificed to achieve completeness if simplicity is retained; especially worthless is consistency of interface.
----
I don't know about you, but IMHO, this is PHP in a nutshell.
Edit: One other little thing I forgot to mention. PHP is like Java in that it is really hard for a metaprogramming or type system nerd to do something tricky and clever that another novice programmer brought in to replace him would not have a chance of unravelling.
- npsimons 14y agoConsistency: The design must not be overly inconsistent. Consistency can be sacrificed for simplicity in some cases, but it is better to drop those parts of the design that deal with less common circumstances than to introduce either complexity or inconsistency in the implementation. . . . I don't know about you, but IMHO, this is PHP in a nutshell. If you had read some of the criticisms of PHP that had been posted to HN (like http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/ http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-de..., which was even linked to in the current article), you'd realize that PHP is nowhere near consistent. I'm not sure simplicity, correctness or completeness apply either. I think the only thing PHP has going for it is momentum (in having a large userbase and being installed almost everywhere).
- wvenable 14y agoPHP's inconsistencies are minor. The problem with quoting the fractal article is at least a third of it is totally wrong and another third is misunderstandings by the author.
- bradwestness 14y agoThe API is what it is, but the real biggest problem with PHP is also it's biggest feature: it's got the lowest barrier to entry of any server-side language. The result is that a lot of PHP is awful, cargo-cult stuff glued together by people who have no idea what they are doing. It's possible for talented developers to create really good programs in PHP, but I don't see how a new language is going to solve the essential problem. People who don't really know how to program and just want to accomplish some simple goal are going to use whatever language is the quickest means to their ends. Copy/paste spaghetti is a nightmare to maintain in any language. And the people creating it are the same people who are /not/ going to read Atwoods post, don't understand very much about how programming works in general, and will continue to create cruddy programs no matter what language it is written in.