On 2012-06-13, Steven D'Aprano <steve+comp.lang.pyt...@pearwood.info> wrote: > On Tue, 12 Jun 2012 12:36:36 +0200, Gilles wrote: > >> I enjoy writing scripts in Python much more than PHP, but with so many >> sites written in PHP, I need to know what major benefits there are in >> choosing Python (or Ruby, ie. not PHP). > > The main benefit is that they are not PHP. > > http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/
I just started learning PHP about a week ago in order to do some work on an embedded device's web site implementation my employer contracted out. I've done a fair bit of web stuff using CGI in shell, C, and Python as well as server-side Javascript. I've done a lot of normal application programming in C and Python and have used a smattering of other languages (Smalltalk, Scheme, Modula, FORTRAN, BASIC, assembly for a variety of processors, and even Prolog). I must say that I agree with the assessement of PHP linked above. It's not that the language has a design that's not to my taste -- it's that it has no design at all. It seems to be a mass of miscellaneous bits and bobs from other languages that have accreted over the years via some sort of random-walk process. PHP seems to encourage (if not require) bad practices such as returning values from functions via global or instance variables. -- Grant Edwards grant.b.edwards Yow! ! I'm in a very at clever and adorable INSANE gmail.com ASYLUM!! -- http://mail.python.org/mailman/listinfo/python-list