Email address obfuscation in effect -- please
click here to turn it off.
[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
> This seems like a good place to incite a language war.
>
> I use both PHP and Python where I work. As my familiarity with both
> languages grows, I find myself hating PHP and liking Python more.
I asked about python as a better alternative earlier, but nobody responded :-P
> To put it simply, PHP is a mess. Different versions have radically
> different default behaviors, namespaces are a mess, with various
> register() functions and an ever-growing number of "magic" symbols.
Much like javascript.
> On the other hand, Python code is much easier to read, and operates
> consistently, and has a simple namespace mechanism for large
> projects.
This is where I argue. The embedded nature of PhP puts it miles ahead of Python in web languages. Granted, I'd never use PhP for anything but dynamic HTML content. Nothing on the web is so complex or involved as to justify the leap to python from php. The "easier to read" is totally BS. Everyone reads code differently, and you'll never find two people who agree on what the easiest way to read code is. I prefer reading PhP to Python, Python is merely more powerful and has better syntax for writing more involved applications.
> PHP feels like it was designed by high-school hackers who want
> something to make a fancy web page (It was) and Python feels like it
> was designed by a wise and experienced language designer. (It was)
I wouldn't say wise. Experienced yes, but just because he's a written a popular language, and has written several (in)famous bits on other languages, doesn't mean he's wise. PhP and Python both have their purpose, and to say one is inherently better in all areas than another is ludicrous. PhP IS for fancy web pages with quick development time. Only relatively recently did anybody get the idiotic idea that it should do more than the web. Python, on the other hand, sucks as a quick web language. It took me less than 3 minutes to get "hello world" pulled from a database and printed to the screen with PhP. It took me 10 minutes with Python. Conversely, it took me 2 minutes to get it to pull from the database and print to CLI with Python, and about 3 minutes in PhP. Python ran a hell of a lot faster though. If you ever want to see which is faster, run apache supporting both off of a 166mhz pc with 16mb. Its a noticable difference. A good analogy, PhP was like loading flat html files with a 33.6 modem. Python was like loading the same html file with a T-1. With CLI I couldn't notice the difference though...
In short, PhP is a back-end javascript, and should be used as such when development time is short. Python is a real programming language, and should not be treated as a rapid dev. language.
> OK, enough flamebait.
Never enough ;-)
Python is the one exception to my rule. I don't like what's online about it, not much is very well written. I had the best luck with the Oreily Python books.
_______________________________________________
members mailing list
EMAIL:PROTECTED
http://mlug.missouri.edu/mailman/listinfo/members