>>>>> "OR" == Octavian Rasnita <orasn...@gmail.com> writes:
OR> From: "Uri Guttman" <u...@stemsystems.com>>>>>>> "OR" == Octavian OR> 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. OR> Not in my country, so this is not generally true. so that doesn't make it a blanket statement. OR> Perl compiles to bytecode but it doesn't save the compiled file, OR> so in non-persistent programs like FastCGI or mod_perl the OR> programs must be compiled again and again. Python saves the OR> compiled bytecode of its modules automaticly and if the next time OR> the program runs, the compiled bytecode is ran without needing to OR> compile the code again. so? that is only startup time and in any daemon/server situation it doesn't matter. runtime matters then and saved bytecode doesn't affect that. OR> Python may not be faster than Perl in all cases, but here are 2 simple OR> programs that can be compared (I haven't added use strict...): OR> In Perl: OR> print fib(35); OR> sub fib { OR> my $n = shift; OR> return $n if $n < 2; OR> fib($n-1) + fib($n-2); OR> } OR> In Python: OR> def fib(n): OR> if n < 2: return n OR> return fib(n-1) + fib(n-2) OR> print fib(35) OR> The compilation of this small program doesn't take too much anyway, OR> but on my computer the Perl code above runs ~ 14 seconds and the OR> Python code runs ~ 7 seconds which is a big difference. so? that is a lousy example with a very small sample size. also recursion is not a good way to benchmark languages. OR> Yes I know that we can use Memoize to speed it up but this is an OR> optimization that can be made to the Python code too. memoize on fibbinacci?? hahah. 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. OR> I doubt that most of the software companies that may offer employment OR> opportunities know that Amazon uses Perl. But it is obviously that OR> Google uses Python because w can see the .py extension on his web OR> sites. huh?? amazon offers employment opportunties and so does imdb (which is all perl!). 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. OR> Why? I have told you why Python is better for. Do you think that Perl OR> has only advantages and absolutely no disadvantage? no. but your arguments have little to back them. this is a useless thread and i am out. 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? OR> It has to do because in my country almost nobody uses Perl. There are OR> just a few companies that use Perl, but most of them do outsourcing OR> for other companies from USA, Western Europe and Australia. OR> And a language which is the best but not required on the labour market OR> has very small value because the programmers usually need to live with OR> the money they earn. move to a better country? get a telecommute job? contract all over the world? OR> And there is no bias here because I like much more Perl and I know it OR> much better and it is better than Python for creating web apps as I OR> said, but it is not the best for everything. perl isn't good to replace assembler, drivers and kernels. not much else it can't do if coded well. too much code in general sucks. uri -- Uri Guttman ------ u...@stemsystems.com -------- http://www.sysarch.com -- ----- Perl Code Review , Architecture, Development, Training, Support ------ --------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com --------- -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/