|
|
|||
which is best among perl,phython,php?
Which is the best among perl,phython and php now?
9 Replies
It really depends what you want to do - right tool for the right job and all that... However, PHP with the release of version 5.3 and shortly version 6 has addressed a lot of the shortcomings that have been levelled at the language in recent years, this along with a steadily maturing supported framework in Zend Framework (ZF for short) still gets my vote.
While I do use both Perl and Python (note that lack of the extra h) Perl I tend to use mostly for system administration tasks and Python, while I like the language a lot, I just don't think in that way currently (I learnt to program before OOP became popular). If you are starting out programming, then Python does make an ideal candidate language to start with. It can be used for gui applications, web programming and system programming; pretty much covering most programmers requirements. PHP has a larger eco-system going for it, but tends to be more used for the Web. It can be used for both systems programming (easily) and gui (harder), but you wont find much support for anything besides web programming with PHP. I hope this helps answer your question a little and if you have any more questions please ask away.
Sysdom.com - Monitoring and Support Services (Launching Feb 2011)
There is never a 'best' programming language.
PHP is more universally-supported on Web servers, making it a good choice for Web development. Python is usually seen as very efficient. Perl is usually seen as very powerful and extensible. Make the choice that is best for your personal needs and preferences. Learn a little about each language, and dive further into the one that you like best.
--Nate
Perl:
0. Very good community 1. Stability, version and OS compatibility 2. CPAN + cpantesters 3. Testing orientation 4. Good Unicode support. 5. Powerful and fast regular expressions 6. Tight and fast integration in Apache (mod_perl) 7. Badly written code is more evident than in other languages 8. Possibility to extend language with language itself and CPAN. Old Python-style OO system is considered outdated - Moose took it's place. Devel::Declare allows adding new keywords. CPAN has modules even for type safety. Inline::* family allows integrating code in other languages. 9. Good readability (see http://www.slideshar...l-presentation/ ), I especially like qr// and x modifier. 10. Very widespread and usage continues to rise. (See http://www.slideshar...l-myths-200909) 11. Real variable scope. 12. Less memory used 13. State variables
Most of what you say about Perl is also evident of many other languages - PHP included.
PHP 0. Very good community 1. Stability, version and OS compatibility - mostly the case in any mature language. 2. PEAR/PECL 3. Testing orientation - depends what you mean, but there are many testing and debugging tools for PHP 4. Good Unicode support. (as of 5.3 this is very true, before you probably would have needed mbstring extension (default on most installs)) 5. Powerful and fast regular expressions (perl compatible library) 6. Tight and fast integration in Apache (mod_php) 7. Badly written code is more evident than in other languages* 8. Possibility to extend language with PECL. 9. Good readability - really depends on the programmer not the language 10. Very widespread and usage continues to rise. 11. Real variable scope. *I disagree that this is a feature of perl, PHP is easier in this and Python more than either (http://mysite.verizon.net/les.peters/id2.html)
Sysdom.com - Monitoring and Support Services (Launching Feb 2011)
DarkFlib:
1. Perl has this better than any other languages. For ex. Perl supports z/OS and VMS. It even works on EBCDIC with Unicode. 2. CPAN is much better both in quality/services and number. Most PHP programmers do not use PEAR. 4. Perl does not need different functions for Unicode. 5. PHP has no qr// and no /x regex modifier. 7. In Perl you can see that code is bad quickly (use of old style, no "use strict", writing code for parsing http params, etc.). In other languages it is harder. As for http://mysite.verizo...peters/id2.html - you can easily see that code is bad for real program (of course it is good for obfuscation contest). 11. PHP almost has no scope. In Perl you can have any scope you want.
For what I do personally andnfor what we do at work, Perl has been our standard choice. Its portability between platforms has bee a major consideration. Thhe fact that it is a default installation for most *nixes is another consideration.
From a development standpoint its debugger environment is large plus as well. It's not the end all be all but if given a choice I always consider it a likely candidate. You cannot go wrong knowing it in addition to other languages.
=========================
Sent to you from my iPad, iPhone, BlackBerry, Laptop, Desktop, or Kitchen Toaster
All three are great languages. But if you're just getting started, I think Python is slightly better at encouraging good behavior and teaching folks to develop good habits, which is why it is often used as a first language in high school programming courses. The structure that it imposes also makes it easier for someone to pick up where others have left off, without as much time required to get up to speed. Perl and PHP depend a little more on the self-discipline of the programmer to not write obfuscated code.
|
|||
|