Well, quite an interesting thread, with many side points. My two cents below, with some side threads of their own. ;-/
Rasmus Lerdorf wrote: > > Of course not. But currently the image for PHP is that it's ONLY > > meant for web scripting. Even as it can be used in various other > > places too. > That has always been our position. "PHP focuses on the Web problem". > That has been the design roadmap, if you will, from day one. A lot of this discussion and debate seems to confuse the problem, "easily making dynamic web pages", with computer science designs (not having "private" XXXX is somehow the problem), or architecture decisions (using persistant XXXX across sessions, or processes, or whatever), or other ancilary tasks to PHP's core strength. Rather than, oh, make web pages, much of this discussion (and, it seems, emotion) was expended *not* on PHP making web pages, but whether or not it did XYZ that a given programmer thinks is "absolutely essential" for a given (web) language. If the *problem* is making dynamic web pages, PHP is a great solution, IMNSHO. Of course, they're always room for improvements to solving a given problem, but many of the arguments didn't seem to focus on "this will make building dynamic web pages easier/faster/simpler", at least not to my (admittedly jaded) eyes. Instead, the arguments focused on how different people like to write their code, well, differently, and suggested changing PHP to match differences, and, as such, suggested that those matters of preference were problems to be solved by PHP. If the problem is "following an OO discipline", one could focus on more OO-constrained environments, rather than PHP. PHP is not trying to focus on pleasing an ideal code architecture spec, it's trying to make dynamic web pages. It does some OO, but "pure OO" isn't related to making dynamic web pages, so there's no real reason to sidetrack into fighting flamewars about PHP following "True OO Discipline"... OO is not about making web pages, it's simply a code style. PHP is about making web pages, not learning or using OO. If the problem is "storing something, in a specific fashion, to meet a given idealized architecture for multiple dynamic pages", one could investigate the various systems that meet whatever ideals they happen to have. If the problem is storing something, that another web page (or the same web page) can use, using a database and PHP can solve the problem, to some rather absurd scalability limits. PHP is about making dynamic web pages, not cool architecture diagrams of "transporting a data object between clusters".... (poking fun at Sun, can you tell?) If the problem is "using a coding construct that I prefer to write code in", then one could investigate languages that appeal more to their specific constructs. If, however, the problem is not with a personal preference for code constructs, but simply making dynamic web pages, then PHP is a great tool. It has all the basic primitives needed to build dynamic pages. If the problem is "I think a web application should be built and designed in a specific way", perhaps folks could look at architectures that work *their* way. If the problem is building complex web applications, with dynamic web pages, PHP is great for solving that problem. It's not great for acting like other platforms or languages, because its not... different languages are best coded for in different ways, and coding complex applications for PHP is no exception. Write code for (not just with, but specifically for) PHP, and it's great to work with. Try to make PHP into C++, or Perl, or *any other language or web application platform*, and PHP may seem to have more "issues", not because it fails to solve the basic problem of making dynamic web applications, but because it fails to solve the problem of making dynamic web applications in a given, specific, way for the individuals who would like PHP to have been designed differently. After watching at least 6 programmers "wash out" with PHP, they all had a similar problem... they wanted PHP to act like their favorite prior coding environment(s), and any differences were "flaws in PHP". They didn't want to deal with PHP's data structures, they wanted PHP's data structures to behave their preferred way. They didn't want PHP's variable scope, they wanted variable scope to behave their preferred way. They didn't want the semi-stateless nature of web pages, they wanted the server and/or client to be highly stateful somehow. They didn't want to have, oh, 1 line of code to change "foo123" to "$array[foo]" and "$array[123]", they wanted a "custom method operating on the foo's object, with try-catch and a return of a new object". The "washed out" programmers didn't want to learn to code *for* PHP, but simply code *with* PHP, and longed for it to work like super-foo-platform-x. It didn't, so some complained (as in this thread??) that it was PHP's failings that stopped them from making their applications. Which is a partial truth. They also stopped themselves from being able to make those applications, because they wanted their applications to work a certain way, and, rather than bending their code/application style towards ways that PHP works well, they seemed to feel that PHP should bend to their style of how their code/applications should work. I, for one, would mourn the day that PHP turned into bloatware that tried to solve too many *style* preferences. Building dynamic web pages is the problem, for me, at least. My clients want software, fast, not some-computing-theorist-approved-way-of-doing-things, or I-learned-language-xyz-and-I-want-all-languages-to-work-the-same, or It-should-be-done-this-way-because-of-proper-coding-war, or it-must-do-this-thingie-this-way-to-be-buzzword-compatible, or look-at-the-grandeur-of-the-meg-of-include-code. I started using PHP because it _didn't_ waste lots of my time and energy on such notions, as compared to ASP, WO, CF, and the like (haven't used AOLserver or .NET yet, so who knows). It did less silly things, (complexity=greater bugs) and it was much faster, and easier to *profit* from, as a result. In closing, thanks to all keeping a careful watch on the WTF-meter, and keeping PHP better than, well, all the other languages I've suffered through with web-work. :-) -Ronabop -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php