From: "Uri Guttman" <u...@stemsystems.com>>>>>>> "OR" == Octavian Rasnita
<orasn...@gmail.com> writes:
OR> Disadvantages:
OR> - Python is prefered by software companies, because it enforce a
OR> single style of programming, not the "there is more than one way to
do
OR> it" style.
preferred? plenty of companies prefer perl.
Not in my country, so this is not generally true.
OR> - Python has a much better support for Windows than Perl.
huh?? perl runs fine on winblows and has many cpan modules for it.
Yes, but Python has a better support. WxPython has a much better
documentation than WxPerl. There are better GUI-based apps that can be used
especially for creating WxPython interfaces.
Python has better modules for interacting with the operating system and I've
seen even 2 screen readers made in Python, one is Orca made by Sun that runs
under Linux, and one is NVDA that runs under Windows.
Most Perl documentation for Windows just recommend reading the horrible
MSDN...
Most Perl experts don't care about Windows at all (and even call it Winblows
to show that it is something bad) and there are too many Perl modules which
are not portable to Windows and so on...
OR> - Python has a better support for desktop apps than Perl.
perl has multiple gui bindings.
Python has even more, but this is not so important. It is important that the
documentation for them is better, especially for WxPython. Even the Perl
programmers need to read WxPython's documentation if they don't know C to be
able to easy understand the documentation for WxPerl.
OR> - Python compiles its modules to bytecode (like Java) so they run
faster.
wrong. perl compiles to byte code too. get your facts straight. python
has never been shown to be faster than perl
Perl compiles to bytecode but it doesn't save the compiled file, so in
non-persistent programs like FastCGI or mod_perl the programs must be
compiled again and again.
Python saves the compiled bytecode of its modules automaticly and if the
next time the program runs, the compiled bytecode is ran without needing to
compile the code again.
Python may not be faster than Perl in all cases, but here are 2 simple
programs that can be compared (I haven't added use strict...):
In Perl:
print fib(35);
sub fib {
my $n = shift;
return $n if $n < 2;
fib($n-1) + fib($n-2);
}
In Python:
def fib(n):
if n < 2: return n
return fib(n-1) + fib(n-2)
print fib(35)
The compilation of this small program doesn't take too much anyway, but on
my computer the Perl code above runs ~ 14 seconds and the Python code runs ~
7 seconds which is a big difference.
Yes I know that we can use Memoize to speed it up but this is an
optimization that can be made to the Python code too.
OR> - Python is used by Google for their dynamic pages and the creator of
OR> Python is employed by Google and this is a good promotion.
so what? amazon uses perl a ton. that is very specious and useless.
I doubt that most of the software companies that may offer employment
opportunities know that Amazon uses Perl. But it is obviously that Google
uses Python because w can see the .py extension on his web sites.
OR> With other words, I think that Perl is better than Python for web
OR> programming and system administration and Python is better for
desktop
OR> apps and for newer technologies.
again, bogus logic.
Why? I have told you why Python is better for. Do you think that Perl has
only advantages and absolutely no disadvantage?
OR> Perl is better if you live in an area where there are already a large
OR> base of Perl programs that need to be maintained and Python is
OR> prefered by younger programmers because it is much cleaner (and
OR> because the young programmers need a job, and the jobs are offered by
OR> software companies that like the language they use to be as standard
OR> as possible).
live?? what does where you live have to do with a language?
It has to do because in my country almost nobody uses Perl. There are just a
few companies that use Perl, but most of them do outsourcing for other
companies from USA, Western Europe and Australia.
And a language which is the best but not required on the labour market has
very small value because the programmers usually need to live with the money
they earn.
Python is not used very much either because in my country only PHP, Java and
DotNet and maybe a little C/C++ are asked, however all the new programmers I
have talked about here are very impressed about Python but consider Perl a
language dead much time ago, so the future is not very bright for those who
want to live by programming in Perl, and this is a disadvantage.
OR> The core language of Python is standard more because of its syntax,
OR> because otherwise, in some cases there are much too many ways to do
OR> some things in Python also, so the thing that "there is only one way
OR> to do it" in Python is not exactly true.
and that means less creativity as well. you don't understand coding if
you think restrictions are good.
It doesn't matter what I think. I like Perl much more than Python because it
is more flexible, and as I said, because it is really better for web
programming, the field I am mostly interested in, but it is very normal that
the software companies prefer those standards (yes, standards are
restrictions) because they like to be able to change the programmers very
easy and to find as many programmers for the wanted language as possible...
which is not the case of Perl, at least in my country.
this is typical of this sort of thread. misinformation, rumors,
unfounded biases, etc. the whole topic is useless. use whatever
languague you like best. if you want different jobs learn different
languages. comparing langs like this is a silly and wasteful exercise.
I have compared the speed of 2 similar programs and the speed of the one
made in Python was double than the speed of the one in Perl.
All WxPerl programmers know how poor is the documentation of WxPerl compared
with the one for WxPython.
Even some mailing lists for Perl use Mailman which is written in Python
although there is a mailing list manager written in Perl, there are at least
2 well known source control programs written in Python (Mercurial and
Bazaar) and none in Perl (because SVK was abandoned), 2 screen readers made
in Python and none in Perl, even some Linux distributions started to create
the administrative tools in Python, Python can be used to create apps for
Symbian while Symbianperl was started but kind of adandoned, there are 4
more downloaders of Python for Android than of Perl for Android, and all
these things are not rumors.
And there is no bias here because I like much more Perl and I know it much
better and it is better than Python for creating web apps as I said, but it
is not the best for everything.
Octavian
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/