4 ms·
Thats interesting. What is it about Phyton that makes it attractive?
by amrithk 18y ago
Thats interesting. What is it about Phyton that makes it attractive?
- Jesin 18y agoIt's incredibly clean and simple.
- simonw 18y agoIt's a significantly better programming language; I don't think you'll be able to find anyone who knows both PHP and Python and will disagree with that statement. PHP is a very simple language with built-in features for web application development. Python is an advanced, multi-paradigm general purpose language that has evolved over more than a decade. Here are a few Python language features that I seriously miss when I'm working in PHP: - Modules and namespaces! This is the feature that initially drove me away from PHP. - List comprehensions (let you construct a new list based on an old list in a one-liner) - Built in iterator support (easy "for item in collection" support for many different types of collection) - First class functions and closures (so you can treat your functions as data) Those are just four off the top of my head. If you haven't looked at Python before (but already know how to program) I suggest taking a look at http://diveintopython.org/ http://diveintopython.org/ which is a free online book.
- deleted 18y ago[deleted]
- norbert 18y agoNot to take a stand, just FYI: PHP5 has built-in iterator support now and PHP 5.3 includes namespace support as well (TBR this month).
- apgwoz 18y agoBut, PHP5's iterator is broken. The only way you can use it is in a foreach loop. In Python, iterators can be used with any iterative construct. Namespace support in PHP never really bothered me, but I've occasionally run into problems with name clashes with built in functions. It'll be welcomed anyway for sure.
- rbanffy 18y agoZope, Grok, Plone and Django, mostly. Python is a very good language: easy to learn, powerful and fast enough (provided you understand how to make its various frameworks scale).