Perl vs Python ... web programming
Results 1 to 3 of 3

Thread: Perl vs Python ... web programming

  1. #1
    Join Date
    Nov 2003

    Perl vs Python ... web programming

    perl is so called duck tape of the internet. my problem is that i'm much more confortable w/ python. are there any drawbacks in using python (underdeveloped libraries or such). am i gonna be forced to use "some" perl anyway... penny for your thoughts?

    also if i'm correct, most of the CGI security issues are caused by poor input validation. does the new Perl have any inherent security protection in its interpreter

  2. #2
    Junior Member
    Join Date
    Jul 2003
    Here's a good link with several comparisons:
    Strike Like Lightening...Envelop Like Darkeness...
    As Strong As Thunder...As Swift As The Wind...
    As Calm As the Water...~Sun Tzu~

  3. #3
    Senior Member
    Join Date
    Jul 2003
    I didn't read all the articles, but I've written a lot of perl and a lot of Python, and am fairly qualified to comment. Python is a joy to program in. It's dynamic typing and the like makes it perhaps not ideal for large projects, but for web programming, it's wonderful. The best thing is that since the language design is so clean, and since the formatting is proscribed, reading other people's code is pretty easy. There's one downside, however: Python is slow. Really slow. Really, really, really slow. However, if you're writing a web app, and you have a database, you probably don't care how fast your programming language is. All of the hard, data-intensive stuff is handled by the database (which is fast), so your speed bottleneck is the network connection between you and the client.

    Perl is fast. Rather absurdly fast, for a scripting language. And it's easy to write little, trivial things in. Other than that, perl is horrible. Reading other people's perl code is neigh impossible. Reading your own code six months after you wrote it is neigh impossible.

    As far as security is concerned, I'd have to say Python is more secure. Not because of any intrinsic betterness on Python's part (both are about equivalent), but because Python's readability makes it easier to catch subtle errors in your code. And what is a security vulnerability, but a bug (often subtle). Both perl and Python avoid direct memory access, so stack/heap smashing and format errors are not something you need to worry about. Both have excellent foundations for input validation. Perl's regexps are a little more integrated into the language, but IMO Python's superior readability more than outweighs perl's regexp convenience.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts