Python as replacement for PHP?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Peter Maas

    #31
    Re: Python as replacement for PHP?

    Bart Nessux schrieb:[color=blue][color=green]
    >>The only points I see in favor of PHP are :
    >>- it's a de facto standard, widely used, widely available, and well
    >>established[/color]
    >
    >
    > That's exactly right. That's my point. I meant nothing more.[/color]

    That's ALL? No preference for specific PHP issues that makes you
    choose/recommend it over Python? If youre "stupidity" posting has
    anything to do with logic then I must conclude that you consider
    everbody who doesn't use the de facto standard (choosing e.g. Linux
    over Windows, Python over Perl) bordering on stupidity.

    Strange, to say the least.

    Mit freundlichen Gruessen,

    Peter Maas

    --
    -------------------------------------------------------------------
    Peter Maas, M+R Infosysteme, D-52070 Aachen, Hubert-Wienen-Str. 24
    Tel +49-241-93878-0 Fax +49-241-93878-20 eMail peter.maas@mplu sr.de
    -------------------------------------------------------------------

    Comment

    • Keith Bowes

      #32
      Re: Python as replacement for PHP?

      Erik Johnson wrote:
      [color=blue]
      >[/color]

      CAUTION: I'm replying as a non-Python programmer.
      [color=blue]
      > 1) I think Python is cool.
      > 2) We can do system administration type scripts (currently
      > implemented in Perl), web page generation (PHP), and (potentially)
      > client-side applications (including GUI's that make socket and/or external
      > HTTP requests) in one language.[/color]

      You can do client-side apps in PHP too. Pass the -q option to the CGI
      version or just use the CLI version.
      GUI - PHP-GTK
      Sockets - The socket extension or fsockopen() to treat it as a regular file.
      [color=blue]
      > 3) Python's interactive interpreter makes it easy to try things out.[/color]

      ? Like the -r option?
      [color=blue]
      > 4) PyUnit - we would like to develop a robust set of tests and be
      > able to do regression testing. I'm not aware of a JUnit/PyUnit analog in
      > PHP. Are you?
      > 5) Python has better code support for complex native data types
      > (e.g., tuples, dictionaries, sequences, etc. and being able to write these
      > directly in a hierarchical structure rather than building them up piecewise
      > with function calls and assignments as in PHP).[/color]

      In PHP, all these things are essentially arrays and that works fine.
      Even the PHP developers say that classes are just syntactic sugar for
      associative arrays (that'll change in PHP 5, though). So PHP is
      procedural; there's nothing wrong with that.
      [color=blue]
      >[/color]

      Not to sound like I hate everything which isn't PHP. It's just that PHP
      does have a wide range of functionality and is moving toward
      command-line/administration capabilities, and is quite easy to learn if
      you know other C-like languages. But if you think that Python better
      serves your purpose, then you should use it. Surely, it would be
      possible to write a strtotime() implementation in Python; someone may
      have already done so.

      Comment

      • Peter KERR

        #33
        Re: Python as replacement for PHP?

        In article <du7n073muvy.fs f@amadeus.cc.tu t.fi>,
        Ville Vainio <ville@spammers .com> wrote:[color=blue]
        >
        > Often Python is the best tool for all the jobs there is to do. People
        > just fail to see that because, driven by prejudice, they opt for the
        > tool that can *only* do whatever the job is at the moment. That might
        > have been sensible 15 years ago, but the software landscape has
        > changed since.
        >[/color]

        and will change again before you're ready :-(
        Use whatever you are happy with that does the job,
        just do it so well that the next guy in your position
        isn't tempted to rewrite it in his favorite language...

        Comment

        • Peter Maas

          #34
          Re: Python as replacement for PHP?

          CountScubula schrieb:[color=blue]
          > You also need to look at what each language was desgined for, sure I can
          > write a dynamic web page in bash or korn, but why? Perl was written to do
          > large extraction and reporting of text files, Python was written as a server
          > language[/color]

          I don't think so. It seems Python was written as a rapid development
          language without a specific application range. That's an advantage
          because you can get a lot of different jobs done very well. That's
          a disadvantage because there's no no-brainer like "Python is for ...".

          A family of marketing phrases comes into mind:

          - Python is NOT for device drivers.
          - Writing a device driver? Beware of Python!
          - OS kernels? Don't even think of Python!
          ....

          :)

          Mit freundlichen Gruessen,

          Peter Maas

          --
          -------------------------------------------------------------------
          Peter Maas, M+R Infosysteme, D-52070 Aachen, Hubert-Wienen-Str. 24
          Tel +49-241-93878-0 Fax +49-241-93878-20 eMail peter.maas@mplu sr.de
          -------------------------------------------------------------------

          Comment

          • Giles Brown

            #35
            Re: XML best practices (was: Python as replacement for PHP?)

            Andy Dingley <dingbat@codesm iths.com> wrote in message news:<1hd240haq pbmnqdltavdt6t2 4ue0jvcl92@4ax. com>...[color=blue]
            > On Sat, 28 Feb 2004 03:54:49 -0000, claird@lairds.c om (Cameron Laird)
            > wrote:
            >[color=green]
            > >Let me get this straight: your preferred vehicle for XML
            > >parsing is Perl regular expressions? That's ... well,[/color]
            >
            > Rather more restrained a comment than I'd be capable of expressing ?[/color]

            http://www.usingenglish.com/glossary/litotes.html maybe?

            Comment

            Working...