From: "Sunita Rani Pradhan" <sunita.prad...@altair.com>
- What all advantages Perl has on top of other scripting languages like
Python , shell , Java ?



Compared with Python:

Advantages:
- Perl offers more free helpful modules for web programming and system administration
- Perl is much more flexible than Python
- Perl is better than Python for working with data structures (arrays, hashes...) and much better for parsing text.
- Perl's syntax doesn't enforce indentation.
- The same kind of modules Perl offers are much more advanced than Python's modules for ORMS, templating systems, web frameworks, form processors. - Perl's Moose object system is much advanced than Python's object system (but note that I compare Moose with Python's default OO system because I don't know if Python also has a module like Moose that offers aditional features, but I guess that it doesn't). - Perl has CPAN, a great archive with a lot of modules and programs like cpan, cpanplus, cpanminus that can be used to install modules very easy. - For Perl the backward compatibility is important, although this doesn't promote very well the newer versions of Perl.

Disadvantages:
- Python is prefered by software companies, because it enforce a single style of programming, not the "there is more than one way to do it" style.
- Python has a much better support for Windows than Perl.
- Python has a better support for desktop apps than Perl.
- Python can be used with newer technologies better than Perl (under Symbian phone for example), There are much more Python programmers that downloaded Python for Android than Perl for Android. - Python can cooperate better with other successful technologies like DotNet and Java.
- Python compiles its modules to bytecode (like Java) so they run faster.
- Python is used by Google for their dynamic pages and the creator of Python is employed by Google and this is a good promotion. - For Python the backward compatibility doesn't seem to be so important, so x = 2 / 3 gives a different result in Python 2.x than in 3.x (0 and 0.666...)

With other words, I think that Perl is better than Python for web programming and system administration and Python is better for desktop apps and for newer technologies. Perl is better if you live in an area where there are already a large base of Perl programs that need to be maintained and Python is prefered by younger programmers because it is much cleaner (and because the young programmers need a job, and the jobs are offered by software companies that like the language they use to be as standard as possible). The core language of Python is standard more because of its syntax, because otherwise, in some cases there are much too many ways to do some things in Python also, so the thing that "there is only one way to do it" in Python is not exactly true.

With the bash the comparison is much simple because Perl can do much more things than bash and much more simple.

Compared with Java:

Advantages:
- Perl doesn't need to pre-compile the code so it is easier to use it for web-based apps. - Perl is not strongly-typed so it is easier to use it with a much bigger productivity. - There are much more free modules that can be found and installed easy. For Java there are a lot of apps, but harder to find.

Disadvantages:
- Java has a better support for threading than Perl.
- Java is much better sustained financially by Oracle/Sun, IBM... and because of this is also prefered in the enterprise field. - Java has some optimizations that makes the programs faster automaticly. In Perl can be made those optimizations, but harder (not very important because Perl is very fast anyway).

There may be many other advantages or disadvantages I have forgotten to tell about but these are just a few that might help you to have an idea...

Octavian


--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to