4 ms·
That was true up to PHP5, where a Java-like, saner subset of the language with stronger typing became available. The genius of PHP was in the code delivery mod
by pygy_ 8y ago
That was true up to PHP5, where a Java-like, saner subset of the language with stronger typing became available.
The genius of PHP was in the code delivery model and the way you could intermix HTML and code in a single page to be served by Apache.
That democratized Web programming and programming at large. The rest of the language was bad, but it didn't matter for success (see "worse is better", where "better" means fitter for the market).
- smt88 8y agoIf you’re saying that PHP was a useful, Turing-complete templating language, I agree. I don’t think it was well-suited for large code bases with lots of business logic, and these days I’m horrified by the idea of a Turing-complete templating language in the first place.
- pygy_ 8y agoTuring completeness doesn't bother me as much as all the security issues that existed by default (some of which are still present to this day). I wish programming languages made a type-level distinction between strings that are and aren't tainted by user input. That would make it so much harder to accidentally introduce injection vectors. I totally agree that PHP was not well suited for writing large and complex programs, but its ubiquitous availability as a deployment platform made it an interesting target anyway. The easy deployment also made it easy for people to learn it by themselves, and consequently there was a large pool of programmers who knew PHP, making it an interesting language from a hiring point of view. And that's how we ended up with piles of crappy, proprietary and OSS PHP code in the wild. The quality of the language is only a minor factor its success.
- smt88 8y ago> The easy deployment... This is an important point that is still underappreciated even today with all of our hindsight.