Article of interest: Python pros/cons for the enterprise

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

    Article of interest: Python pros/cons for the enterprise

    This is part of a series examining the strengths and weaknesses of
    various scripting languages, with particular attention to enterprise
    (read: big company) use.

    You Used Python to Write WHAT?
    Python is a powerful, easy-to-use scripting language suitable for use
    in the enterprise, although it is not right for absolutely every use.
    Python expert Martin Aspeli identifies when Python is the right
    choice, and when another language might be a better option.

  • Tim Chase

    #2
    Re: Article of interest: Python pros/cons for the enterprise

    You Used Python to Write WHAT?"""
    Furthermore, the power and expressivity that Python offers means
    that it may require more skilled developers.
    [...down to the summary...]
    Python may not be an appropriate choice if you:
    [...]
    * Rely on teams of less-experienced programmers. These
    developers may benefit from the wider availability of training
    for languages like Java and are less likely to make mistakes with
    a compile-time, type-checked language.
    """

    Oh noes! You might need competent programmers that actually
    understand what they're doing!

    (they might even have to write testing code to make sure their
    code works as intended...it's a good thing that Python includes
    unittest and doctest modules in the stock install)

    Sigh. Any programmer that can overcome the hurdles of learning
    Java or C# can quickly/easily pick up Python as long as they're
    willing to unlearn some bad habits.

    -tkc


    Comment

    • Carl Banks

      #3
      Re: Article of interest: Python pros/cons for the enterprise

      On Feb 20, 8:58 am, Tim Chase <python.l...@ti m.thechases.com wrote:
      You Used Python to Write WHAT?
      http://www.cio.com/article/185350
      >
      """
      Furthermore, the power and expressivity that Python offers means
      that it may require more skilled developers.
      [...down to the summary...]
      Python may not be an appropriate choice if you:
      [...]
      * Rely on teams of less-experienced programmers. These
      developers may benefit from the wider availability of training
      for languages like Java and are less likely to make mistakes with
      a compile-time, type-checked language.
      """
      >
      Oh noes! You might need competent programmers that actually
      understand what they're doing!
      >
      (they might even have to write testing code to make sure their
      code works as intended...it's a good thing that Python includes
      unittest and doctest modules in the stock install)
      >
      Sigh. Any programmer that can overcome the hurdles of learning
      Java or C# can quickly/easily pick up Python as long as they're
      willing to unlearn some bad habits.

      C++ is a compile-time, type-checked language, which means it is
      totally safer for newbies than Python. Yep, your big company is
      totally safe with newbie C++ programmers.


      Carl Banks

      Comment

      • Bruno Desthuilliers

        #4
        Re: Article of interest: Python pros/cons for the enterprise

        Carl Banks a écrit :
        On Feb 20, 8:58 am, Tim Chase <python.l...@ti m.thechases.com wrote:
        >>You Used Python to Write WHAT?
        >>http://www.cio.com/article/185350
        >"""
        >Furthermore, the power and expressivity that Python offers means
        >that it may require more skilled developers.
        >[...down to the summary...]
        >Python may not be an appropriate choice if you:
        >[...]
        >* Rely on teams of less-experienced programmers. These
        >developers may benefit from the wider availability of training
        >for languages like Java and are less likely to make mistakes with
        >a compile-time, type-checked language.
        >"""
        >>
        (snip)
        >
        C++ is a compile-time, type-checked language, which means it is
        totally safer for newbies than Python. Yep, your big company is
        totally safe with newbie C++ programmers.
        >
        Mouarf ! Brillant demonstration, thanks Carl !-)

        (and BTW, +1 QOTW)

        Comment

        • Nicola Musatti

          #5
          Re: Article of interest: Python pros/cons for the enterprise

          On Feb 21, 10:55 am, Bruno Desthuilliers <bruno.
          42.desthuilli.. .@wtf.websitebu ro.oops.comwrot e:
          Carl Banks a écrit :
          [...]
          C++ is a compile-time, type-checked language, which means it is
          totally safer for newbies than Python. Yep, your big company is
          totally safe with newbie C++ programmers.
          >
          Mouarf ! Brillant demonstration, thanks Carl !-)
          >
          (and BTW, +1 QOTW)
          Newbies learn, and the fundamental C++ lessons are usually learnt
          quite easily. Unless we're talking about idiots, that is, but in this
          case at least C++ is likely to make their deficiencies evident sooner
          than most other programming languages. So, yes, your big company is
          likely to be safer with newbie C++ programmers than with Python newbie
          programmers.

          Had we been speaking of productivity... but we weren't, were we?

          Cheers,
          Nicola Musatti

          Comment

          • Ryan Ginstrom

            #6
            RE: Article of interest: Python pros/cons for the enterprise

            On Behalf Of Nicola Musatti
            Newbies learn, and the fundamental C++ lessons are usually
            learnt quite easily. Unless we're talking about idiots, that
            is, but in this case at least C++ is likely to make their
            deficiencies evident sooner than most other programming
            languages. So, yes, your big company is likely to be safer
            with newbie C++ programmers than with Python newbie programmers.
            The danger of memory leaks alone makes C++ a decidedly newbie-unfriendly
            language. Java I might go along with, but C++?

            Regards,
            Ryan Ginstrom
            (who learned C++ before Python and has grappled with his share of memory
            bugs)

            Comment

            • Nicola Musatti

              #7
              Re: Article of interest: Python pros/cons for the enterprise

              Please do not reply personally to newsgroup postings, thank you.

              On Thu, Feb 21, 2008 at 4:00 PM, Tim Chase
              <python.list@ti m.thechases.com wrote:
              [...]

              --
              Nicola.Musatti <atgmail <dotcom
              Home: http://nicola.musatti.googlepages.com/home
              Blog: http://wthwdik.wordpress.com/

              Comment

              • Nicola Musatti

                #8
                Re: Article of interest: Python pros/cons for the enterprise

                On Feb 21, 3:46 pm, "Ryan Ginstrom" <softw...@ginst rom.comwrote:
                On Behalf Of Nicola Musatti
                Newbies learn, and the fundamental C++ lessons are usually
                learnt quite easily. Unless we're talking about idiots, that
                is, but in this case at least C++ is likely to make their
                deficiencies evident sooner than most other programming
                languages. So, yes, your big company is likely to be safer
                with newbie C++ programmers than with Python newbie programmers.
                >
                The danger of memory leaks alone makes C++ a decidedly newbie-unfriendly
                language. Java I might go along with, but C++?
                Memory *leaks* are just as common in garbage collected languages if
                not more, thanks to C++'s deterministic destruction and its standard
                library, especially if complemented with smart pointers such as
                Boost's shared_ptr. At least C++ programmers tend to know that memory
                must be managed, while newbies in other languages are often lead to
                believe - wrongly - that the garbage collector takes care of
                everything.

                Dereferencing invalid pointers however is indeed a more serious
                problem. This is the one lesson I had in mind when I wrote my previous
                message; newbies that are not hopeless tend to learn it rather quickly
                and the number of mistakes of this kind they make tends to fall in a
                rather short time. I do admit however that even experienced
                programmers make similar errors every now and again.

                While attempting to dereference a null reference is a rather common
                mistake in languages such as Java and C# - I'm not sure about Python -
                the one invaluable guarantee provided by the garbage collector is the
                absence of *invalid* references. This is one of the reasons why
                there's an ongoing effort to add garbage collection to the C++
                standard, albeit in an optional form.

                Cheers,
                Nicola Musatti

                Comment

                • Jeff Schwab

                  #9
                  Re: Article of interest: Python pros/cons for the enterprise

                  Bruno Desthuilliers wrote:
                  Carl Banks a écrit :
                  >On Feb 20, 8:58 am, Tim Chase <python.l...@ti m.thechases.com wrote:
                  >>>You Used Python to Write WHAT?
                  >>>http://www.cio.com/article/185350
                  >>"""
                  >>Furthermore , the power and expressivity that Python offers means
                  >>that it may require more skilled developers.
                  >>[...down to the summary...]
                  >>Python may not be an appropriate choice if you:
                  >>[...]
                  >>* Rely on teams of less-experienced programmers. These
                  >>developers may benefit from the wider availability of training
                  >>for languages like Java and are less likely to make mistakes with
                  >>a compile-time, type-checked language.
                  >>"""
                  >>>
                  (snip)
                  >>
                  >C++ is a compile-time, type-checked language, which means it is
                  >totally safer for newbies than Python. Yep, your big company is
                  >totally safe with newbie C++ programmers.
                  >>
                  >
                  Mouarf ! Brillant demonstration, thanks Carl !-)
                  >
                  (and BTW, +1 QOTW)

                  NB: This is not a troll. (Please, nobody try to be cute with a "yes it
                  is" reply.)

                  c.l.python seem to be about the most close-minded of any of the
                  currently popular language-specific news groups. It's just taken for
                  granted that Perl and C++, two of my personal favorite things in this
                  world, inherently favor ugly, buggy code. That is the farthest thing
                  from the truth as I see it. You can (and plenty of people will) write
                  terrible code in any language, including Python.

                  To use Python effectively, you have to know something about how it
                  works, and the same is true of Perl and C++. But a newbie who's
                  learning from a decent source (avoid the "C++ for Morons" style books)
                  is likely (I contend) to be writing semi-useful programs about as fast
                  as with Python, and to be writing heavy-duty work-horse programs far sooner.

                  Perl is, and always has been, a language for getting your job done; when
                  everything else failed, Perl and C++ got me through some of the toughest
                  tasks of my life. Translating file formats, automating system-level
                  tasks... And now that the C++ standard library is getting regular
                  expressions, I can replace plenty of glued-together scripts with
                  single-language, cohesive applications.

                  I like Python, and I think it's got a brilliant future ahead of it. It
                  is rapidly becoming the dynamic language of choice, especially for C++
                  projects. I am glad that Python can be extended straightforward ly in
                  any C-linkable language. But this bashing of other powerful languages
                  on the basis that they're hard to read and hard to use correctly is,
                  frankly, nonsense.

                  Comment

                  • John Nagle

                    #10
                    Re: Article of interest: Python pros/cons for the enterprise

                    Paul Boddie wrote:
                    On 21 Feb, 19:22, Nicola Musatti <nicola.musa... @gmail.comwrote :
                    >On Feb 21, 6:31 pm, Paul Boddie <p...@boddie.or g.ukwrote:
                    >[...]
                    >>
                    >>The main reason why C++ has declined in usage is because almost
                    >>everything of practical value is optional.
                    >The main reason why C++ has declined in usage is because it never got
                    >the kind of corporate marketing enjoyed by Java and C#.
                    No, the real problem is that C++ is the only major language to
                    have hiding ("abstractio n") without memory safety. C has neither hiding
                    nor safety. Python, Java, Modula 3, Delphi, Ruby, C#, and Ada have hiding
                    with safety. Javascript, Perl, and LISP have safety without hiding. C++
                    stands alone as having hiding without safety, the least safe possibility.

                    The safety problems with C++ could be fixed, but the C++ committee
                    is off in template la-la land, ignoring safety issues in favor of
                    cute template features no one will use in production code.

                    This has nothing to do with language efficiency or whether the
                    language is interpreted. Of the languages listed with both hiding
                    and safety, Ada and Modula 3 are always compiled to hard machine code,
                    and Java can be. (GCC offers that option.)

                    John Nagle

                    Comment

                    • Carl Banks

                      #11
                      Re: Article of interest: Python pros/cons for the enterprise

                      On Feb 21, 1:22 pm, Nicola Musatti <nicola.musa... @gmail.comwrote :
                      There are other downsides to garbage collection, as the fact that it
                      makes it harder to implement the Resource Acquisition Is
                      Initialization idiom, due to the lack of deterministic destruction.
                      That's not a downside: it's at least a wash.

                      In C++ you manage memory and the language manages resources. In
                      Python you manage resources and the language manages memory.

                      RAII is merely one way of minimizing complexity. Garbage collection
                      is another way.


                      Carl Banks

                      Comment

                      • Jeff Schwab

                        #12
                        Re: Article of interest: Python pros/cons for the enterprise

                        Carl Banks wrote:
                        On Feb 21, 1:22 pm, Nicola Musatti <nicola.musa... @gmail.comwrote :
                        >There are other downsides to garbage collection, as the fact that it
                        >makes it harder to implement the Resource Acquisition Is
                        >Initializati on idiom, due to the lack of deterministic destruction.
                        >
                        That's not a downside: it's at least a wash.
                        >
                        In C++ you manage memory and the language manages resources. In
                        Python you manage resources and the language manages memory.
                        >
                        RAII is merely one way of minimizing complexity. Garbage collection
                        is another way.
                        If you've already got a generic, language-supported way to manage
                        resources (like RAII with deterministic destruction), then why bother
                        with garbage collection? I'm not trying to knock it; it was a big step
                        up from C-style "who forgot to delete a pointer" games. It just seems
                        to me like a solution to something that's no longer a problem, at least
                        in well-written C++ code. I'll take destructors over GC any day.

                        Comment

                        • Carl Banks

                          #13
                          Re: Article of interest: Python pros/cons for the enterprise

                          On Feb 21, 7:17 pm, Jeff Schwab <j...@schwabcen ter.comwrote:
                          Carl Banks wrote:
                          On Feb 21, 1:22 pm, Nicola Musatti <nicola.musa... @gmail.comwrote :
                          There are other downsides to garbage collection, as the fact that it
                          makes it harder to implement the Resource Acquisition Is
                          Initialization idiom, due to the lack of deterministic destruction.
                          >
                          That's not a downside: it's at least a wash.
                          >
                          In C++ you manage memory and the language manages resources. In
                          Python you manage resources and the language manages memory.
                          >
                          RAII is merely one way of minimizing complexity. Garbage collection
                          is another way.
                          >
                          If you've already got a generic, language-supported way to manage
                          resources (like RAII with deterministic destruction), then why bother
                          with garbage collection?
                          Because now you have to manage memory? Did you read my post? You
                          have to manage one thing or the other.

                          I'm not trying to knock it; it was a big step
                          up from C-style "who forgot to delete a pointer" games. It just seems
                          to me like a solution to something that's no longer a problem, at least
                          in well-written C++ code. I'll take destructors over GC any day.
                          About 2% of the objects I creat have resources other than memory. I
                          would rather manage resources of 2% of objects than manage memory of
                          100%. YMMV, but I suspect mine is the more common opinion, if the
                          recent (like, 10-year) trend in programming languages is any
                          indication.


                          Carl Banks

                          Comment

                          • Carl Banks

                            #14
                            Re: Article of interest: Python pros/cons for the enterprise

                            On Feb 21, 11:17 am, "Reedick, Andrew" <jr9...@ATT.COM wrote:
                            So I wouldn't be
                            quick to dismiss the notion that Java/C#/C++ are more newbie-safe than
                            Python. =/

                            FWIW, when I posted my comment about C++, I was mocking the article
                            writer's notion that it was static typing and compile-time checking
                            that made Java and C# "safer" for newbies, by presenting an example
                            that clearly defied that. I was taking it for granted the C++ is
                            notoriously dangerous and newbie-unfriendly.

                            Obviously it is not a universal opinion (yet). Too bad.

                            But all I was really saying is that there are far more more important
                            things when it comes to "safety" than dynamic typing.


                            Carl Banks

                            Comment

                            • George Sakkis

                              #15
                              Re: Article of interest: Python pros/cons for the enterprise

                              Paul Rubin wrote:
                              It just seems to me that there is a killer language just around the
                              corner, with Python's ease-of-use but with a serious compile-time type
                              system, maybe some kind of cross between ML and Python.
                              Could Boo or Cobra fit the bill ? If not, what's missing at a
                              technical level (i.e. ignoring current maturity, community size,
                              marketing, etc.) ?

                              George

                              Comment

                              Working...