Lot of people hate these discussions I <3 them.
Can someone tell me some pros and cons of using python over php? I recently heard from several people that python is even better than php for website developement so I am wondering if that is actually true.
Someone has experience with that?
Hey,
Python has its nice things, and is generally considered more hip then php. So are languages such as Ruby. Its true there are some stupid things in php, such as inconsistencies in the base library, and the dozen lines needed to do a map and a filter (vs one in python) in a readable way. If one looks at the bigger picture, those are not deal breakers though. Creating well crafted code is definitely possible in PHP. Unfortunately PHP is one of those languages (as is JavaScript) where most participators do not really know what they are doing. Copying some JS around and kicking it into the shape you like, or writing a plugin for wordpress do not qualify one as a good developer. So I think people that have the "You cannot do nice things in PHP as the language is broken, in Python its so much nicer" attitude are rather short sighted (or just trolling). (And I'm not implying OP has this attitude.) Those who create messes in PHP are going to do the same thing in Python.
To answer the question if python is better then PHP for website dev: it depends on the situation. Do you have a legacy system in PHP and a team of people familiar with PHP, then go with PHP. If you have never done Python, and want to start a toy project, go play with Python.
Cheers
-- Jeroen De Dauw http://www.bn2vs.com Don't panic. Don't be evil. ~=[,,_,,]:3 --
On Sat, Jul 27, 2013 at 11:48 AM, Jeroen De Dauw jeroendedauw@gmail.comwrote:
Hey,
Python has its nice things, and is generally considered more hip then php. So are languages such as Ruby. Its true there are some stupid things in php, such as inconsistencies in the base library, and the dozen lines needed to do a map and a filter (vs one in python) in a readable way. If one looks at the bigger picture, those are not deal breakers though. Creating well crafted code is definitely possible in PHP. Unfortunately PHP is one of those languages (as is JavaScript) where most participators do not really know what they are doing. Copying some JS around and kicking it into the shape you like, or writing a plugin for wordpress do not qualify one as a good developer. So I think people that have the "You cannot do nice things in PHP as the language is broken, in Python its so much nicer" attitude are rather short sighted (or just trolling). (And I'm not implying OP has this attitude.) Those who create messes in PHP are going to do the same thing in Python.
To answer the question if python is better then PHP for website dev: it depends on the situation. Do you have a legacy system in PHP and a team of people familiar with PHP, then go with PHP. If you have never done Python, and want to start a toy project, go play with Python.
Everything said here. In lots of cases, you can pick the tool you feel most comfortable with because for all practical purposes it won't matter at all. That being said, there's some things that each language may excel at, so picking the right tool for the task at hand is important.
And no matter the tool, you can always write bad code and look like a fool; that is language independent ;-)
-Chad
Well I know I can write a website in c++ (you can always extend apache with some nice module), but despite it would be probably very effective (much faster than using interpreted language) it would require a lot of work to do that.
I am no huge fan of python, in fact I don't like it very much, and indeed this is rather generic question, not regarding anything specific (although in fact I am considering creation of some webbased simple interface for one of my tools on wmflabs and I was considering trying python this time).
The reason why I ask is that php always seemed quite nice to me for dynamic website development, and I am quite curious how it happened, that something else is beating it in popularity (yes there are more php sites ATM, but who knows how it's gonna look like in few years given this python-epidemy :))
On Sat, Jul 27, 2013 at 10:43 PM, Chad innocentkiller@gmail.com wrote:
On Sat, Jul 27, 2013 at 11:48 AM, Jeroen De Dauw jeroendedauw@gmail.comwrote:
Hey,
Python has its nice things, and is generally considered more hip then php. So are languages such as Ruby. Its true there are some stupid things in php, such as inconsistencies in the base library, and the dozen lines needed to do a map and a filter (vs one in python) in a readable way. If one looks at the bigger picture, those are not deal breakers though. Creating well crafted code is definitely possible in PHP. Unfortunately PHP is one of those languages (as is JavaScript) where most participators do not really know what they are doing. Copying some JS around and kicking it into the shape you like, or writing a plugin for wordpress do not qualify one as a good developer. So I think people that have the "You cannot do nice things in PHP as the language is broken, in Python its so much nicer" attitude are rather short sighted (or just trolling). (And I'm not implying OP has this attitude.) Those who create messes in PHP are going to do the same thing in Python.
To answer the question if python is better then PHP for website dev: it depends on the situation. Do you have a legacy system in PHP and a team of people familiar with PHP, then go with PHP. If you have never done Python, and want to start a toy project, go play with Python.
Everything said here. In lots of cases, you can pick the tool you feel most comfortable with because for all practical purposes it won't matter at all. That being said, there's some things that each language may excel at, so picking the right tool for the task at hand is important.
And no matter the tool, you can always write bad code and look like a fool; that is language independent ;-)
-Chad _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
On Sat, Jul 27, 2013 at 2:14 PM, Petr Bena benapetr@gmail.com wrote:
The reason why I ask is that php always seemed quite nice to me for dynamic website development, and I am quite curious how it happened, that something else is beating it in popularity (yes there are more php sites ATM, but who knows how it's gonna look like in few years given this python-epidemy :))
It was designed to do that from the get go. It's not Personal Home Page for nothing ;-)
-Chad
May I recommend taking a look at Go? I'd love to implement a Wiki in Go, if I had the time or motivation (and not a million other things I want to do).
Go captures my excitement.
Oh but, a word of warning; if you are using to one language, then Go will be rather different.
This is not exactly the best venue, as MediaWiki is somewhat firmly committed by now, but Python is more firmly committed to good OOP principles and cleaner as a result if you code pretty consistently in that mode.
There seem to be less complete Python web frameworks / toolkits in comparison, however.
You can write websites in anything from assembly to bash scripts to PHP to Python to C to C++ to Ruby to whitespace.
The question is, what are you doing, what do you want to use that already exists, and what do you want to write from scratch...
George William Herbert Sent from my iPhone
On Jul 27, 2013, at 11:29 AM, Petr Bena benapetr@gmail.com wrote:
Lot of people hate these discussions I <3 them.
Can someone tell me some pros and cons of using python over php? I recently heard from several people that python is even better than php for website developement so I am wondering if that is actually true.
Someone has experience with that?
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Can we all just agree that haskell, clojurescript and INTERCAL are the best ever, and move on?
You forgot Erlang, for those programming flow management... 8-)
But yes, this is an open ended rathole...
Not good for this list, probably.
George William Herbert Sent from my iPhone
On Jul 27, 2013, at 11:55 AM, Yuvi Panda yuvipanda@gmail.com wrote:
Can we all just agree that haskell, clojurescript and INTERCAL are the best ever, and move on?
-- Yuvi Panda T http://yuvi.in/blog
Is there a specific context for this question? Are you considering PHP v. Python for some MW tool? If so I would include that context, because it makes answering the question much easier.
As for answering the question of Python v. PHP, I like to look at languages more from the feature comparison than from the library comparison. In other words, sure it's nice that PHP has array_ukey_uassoc (or whatever it's called), but you could just implement that natively if you really wanted to.
From the feature perspective, as already mentioned, Python has a much
better OOP implementation than PHP. It supports operator overloading, multiple inheritance, and metaclass programming. These are all extremely useful in designing objects that behave like actual types. On the other hand, Python doesn't support member protection (private/protected properties), pure virtual functions (aka, abstract functions).
Aside from that, Python also supports named function parameters (as well as named variadic function parameters) and decorators. Combining all of the above, I've found Python to be a significantly more useful language for creating applications that are sanely designed.
*-- * *Tyler Romeo* Stevens Institute of Technology, Class of 2016 Major in Computer Science www.whizkidztech.com | tylerromeo@gmail.com
On Sat, Jul 27, 2013 at 3:20 PM, George Herbert george.herbert@gmail.comwrote:
You forgot Erlang, for those programming flow management... 8-)
But yes, this is an open ended rathole...
Not good for this list, probably.
George William Herbert Sent from my iPhone
On Jul 27, 2013, at 11:55 AM, Yuvi Panda yuvipanda@gmail.com wrote:
Can we all just agree that haskell, clojurescript and INTERCAL are the best ever, and move on?
-- Yuvi Panda T http://yuvi.in/blog
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
I will pass your approbation on to ESR :_)
Cheers, -- jra
----- Original Message -----
From: "Yuvi Panda" yuvipanda@gmail.com To: "Wikimedia developers" wikitech-l@lists.wikimedia.org Sent: Saturday, July 27, 2013 2:55:46 PM Subject: Re: [Wikitech-l] python vs php Can we all just agree that haskell, clojurescript and INTERCAL are the best ever, and move on?
-- Yuvi Panda T http://yuvi.in/blog
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
On Saturday, July 27, 2013, Yuvi Panda wrote:
Can we all just agree that haskell, clojurescript and INTERCAL are the best ever, and move on?
-- Yuvi Panda T http://yuvi.in/blog
Apropos...
http://www.developerarguments.com/http://www.developerarguments.com/sysv-vs-bsd/
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org javascript:; https://lists.wikimedia.org/mailman/listinfo/wikitech-l
The problem is not awkward syntax of PHP. Main problem is that PHP is a specialized language. For example it does not have built-in threading. Posix threading is not universally available for PHP. Python and Java has it's own VM-backed threading everywhere. Java is suitable platform to build OS. PHP is not. Even web server backend itself is rarely implemented in PHP. http://www.artima.com/insidejvm/ed2/jvm.html "Complete feature" language should be suitable to build OS. Perhaps Zend VM could be "beefed up" itself to make PHP the same class as Java. Dmitriy
On Sun, Jul 28, 2013 at 10:59 PM, Dmitriy Sintsov questpc@rambler.ruwrote:
The problem is not awkward syntax of PHP. Main problem is that PHP is a specialized language. For example it does not have built-in threading. Posix threading is not universally available for PHP. Python and Java has it's own VM-backed threading everywhere. Java is suitable platform to build OS. PHP is not. Even web server backend itself is rarely implemented in PHP. http://www.artima.com/**insidejvm/ed2/jvm.htmlhttp://www.artima.com/insidejvm/ed2/jvm.html "Complete feature" language should be suitable to build OS. Perhaps Zend VM could be "beefed up" itself to make PHP the same class as Java.
And on that note, this thread (like the other one) has run its course. Like that one, I recommend everyone going back to your silly cat videos or whatever else you enjoy doing.
-Chad
On Sat, Jul 27, 2013 at 11:29 AM, Petr Bena benapetr@gmail.com wrote:
Lot of people hate these discussions I <3 them.
Can someone tell me some pros and cons of using python over php? I recently heard from several people that python is even better than php for website developement so I am wondering if that is actually true.
Someone has experience with that?
Try it and see. Flask (http://flask.pocoo.org/) is the Python community's darling, but I'd recommend starting with Bottle (< http://bottlepy.org/docs/dev/%3E) instead. It's distributed as a single file and has no dependencies outside the Python standard library, which means you can get work done without having to grok Python packaging and distribution.
Django (https://www.djangoproject.com/) is Python's answer to Ruby on Rails. It's excellent, robust, well-documented and has a great community but its scope is very large. If you start with it you'll have a hard time separating its patterns and conventions from Python's, and thus it is not ideally suited for a newcomer to the language.
wikitech-l@lists.wikimedia.org