dynamic typing question

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

    dynamic typing question

    I work for at a college where I am one of 2 full-time developers and we are looking to program a new
    software package fro the campus. This is a huge project as it will include everything from registration to
    business office. We are considering useing Java or Python. I for one don't like Java because I feel the
    GUI is clunky. I also think that we could produce quality programs faster in Python.

    The other programmer here is very concerned about dynamic typing though in Python. He feels like this
    would be too much of a hinderance on us and too easy for us to make a mistake and not catch it until
    runtime making debugging harder.

    OK what are your guys thoughts here? How have you all overcome the lack of static typing? Is Python a
    bad decision here? By the way we will be using Postgres in the back if that matters to anyone.

  • Jarek Zgoda

    #2
    Re: dynamic typing question

    Jason Tesser <JTesser@nbbc.e du> pisze:
    [color=blue]
    > I work for at a college where I am one of 2 full-time developers and
    > we are looking to program a new software package fro the campus. This
    > is a huge project as it will include everything from registration to
    > business office. We are considering useing Java or Python. I for one
    > don't like Java because I feel the GUI is clunky. I also think that
    > we could produce quality programs faster in Python.
    >
    > The other programmer here is very concerned about dynamic typing
    > though in Python. He feels like this would be too much of a
    > hinderance on us and too easy for us to make a mistake and not catch
    > it until runtime making debugging harder.
    >
    > OK what are your guys thoughts here? How have you all overcome the
    > lack of static typing? Is Python a bad decision here? By the way we
    > will be using Postgres in the back if that matters to anyone.[/color]

    If Python is good for banks[1], insurance companies[2], guys that do big
    booms[3] and other significant parties, why colleges are worry?

    [1]. This month I heard that some bank in Spain decided to use Pyro
    (Python Remote Objects).
    [2]. I work in one of them.
    [3]. Lawrence Livermoore National Laboratory. You know. These guys that
    made the Bikini Islands disappeared.

    Dynamic typing (with all other flexibility that Python offers) is a
    wonderful thing. I'm really sick when I must write anything in
    ObjectPascal.

    --
    Jarek Zgoda
    Unregistered Linux User # -1
    http://www.zgoda.biz/ JID:zgoda@chrom e.pl http://zgoda.jogger.pl/
    NP: Metallica - Helpless

    Comment

    • Cameron Laird

      #3
      Re: dynamic typing question

      In article <mailman.355.10 71850867.9307.p ython-list@python.org >,
      Jason Tesser <JTesser@nbbc.e du> wrote:[color=blue]
      >I work for at a college where I am one of 2 full-time developers and we
      >are looking to program a new
      >software package fro the campus. This is a huge project as it will
      >include everything from registration to
      >business office. We are considering useing Java or Python. I for one
      >don't like Java because I feel the
      >GUI is clunky. I also think that we could produce quality programs
      >faster in Python.[/color]

      Comment

      • Hung Jung Lu

        #4
        Re: dynamic typing question

        claird@lairds.c om (Cameron Laird) wrote in message news:<vuojf5kc3 v1lca@corp.supe rnews.com>...[color=blue]
        > 1. Why, in your mind or your teammate's,
        > is dynamic typing a "lack"? What, pre-
        > cisely, is the benefit of static typing?
        > There are a number of legitimate
        > answers. It occurs to me that, without
        > precision on which interest you, we
        > might be missing an opportunity to
        > clarify "The Python Way" significantly.[/color]

        One static typing advantage I've run into:

        When you change the name of a variable in a class, and re-compile the
        program, the compiler shows you ALL places where compilation fails.
        These could be hundreds of places in dozens of files. In dynamically
        typed language like Python, you have to rely on text search, which
        often yields many false positives, especially for common/overloaded
        names like .count, .name, .type, etc. In statically-typed languages,
        making name changes is not very painful, since the compiler will tell
        you where exactly you need to follow up with the changes. In
        dynamically typed language, you will have to manually write unit test
        codes to ensure name consistency.

        I am sure Python people have come up with strategies to deal with this
        problem. That's what I'd like to hear. (Unit test is one route.) But
        this is one place where I've found statically-typed compilers useful.
        I mean, I have seen this discussion many times, but most responses
        from Python users have not been realistic (often simply shrugging off
        the problem and saying something like "compilers don't detect all the
        bugs, blah blah blah".) I would like to hear more real-life experience
        rather than academic conjectures.

        regards,

        Hung Jung

        Comment

        • Skip Montanaro

          #5
          Re: dynamic typing question


          HJL> One static typing advantage I've run into:

          HJL> When you change the name of a variable in a class, and re-compile
          HJL> the program, the compiler shows you ALL places where compilation
          HJL> fails. These could be hundreds of places in dozens of files.

          ...

          HJL> I am sure Python people have come up with strategies to deal with
          HJL> this problem. That's what I'd like to hear. (Unit test is one

          As others have pointed out, pychecker is good at catching these sorts of
          problems.

          HJL> I would like to hear more real-life experience rather than academic
          HJL> conjectures.

          I've used pychecker in real-life to detect these sorts of problems, in other
          peoples' code no less, even though I have a (non-academic) position at
          Northwestern University. ;-)

          Skip

          Comment

          • John Roth

            #6
            Re: dynamic typing question


            "Hung Jung Lu" <hungjunglu@yah oo.com> wrote in message
            news:8ef9bea6.0 312261227.56ade 9a9@posting.goo gle.com...[color=blue]
            > claird@lairds.c om (Cameron Laird) wrote in message[/color]
            news:<vuojf5kc3 v1lca@corp.supe rnews.com>...[color=blue][color=green]
            > > 1. Why, in your mind or your teammate's,
            > > is dynamic typing a "lack"? What, pre-
            > > cisely, is the benefit of static typing?
            > > There are a number of legitimate
            > > answers. It occurs to me that, without
            > > precision on which interest you, we
            > > might be missing an opportunity to
            > > clarify "The Python Way" significantly.[/color]
            >
            > One static typing advantage I've run into:
            >
            > When you change the name of a variable in a class, and re-compile the
            > program, the compiler shows you ALL places where compilation fails.
            > These could be hundreds of places in dozens of files. In dynamically
            > typed language like Python, you have to rely on text search, which
            > often yields many false positives, especially for common/overloaded
            > names like .count, .name, .type, etc. In statically-typed languages,
            > making name changes is not very painful, since the compiler will tell
            > you where exactly you need to follow up with the changes. In
            > dynamically typed language, you will have to manually write unit test
            > codes to ensure name consistency.
            >
            > I am sure Python people have come up with strategies to deal with this
            > problem. That's what I'd like to hear. (Unit test is one route.) But
            > this is one place where I've found statically-typed compilers useful.
            > I mean, I have seen this discussion many times, but most responses
            > from Python users have not been realistic (often simply shrugging off
            > the problem and saying something like "compilers don't detect all the
            > bugs, blah blah blah".) I would like to hear more real-life experience
            > rather than academic conjectures.[/color]

            The OP said they would be using Test Driven Development. In TDD,
            you write maybe a half dozen lines before running your test suite. If
            it ran last time, and it didn't run this time, then you have maybe a
            half dozen lines to check. Lots of people regard the 'undo' command
            as a great debugger in this case.

            Of course, if you write hundreds of lines before doing a compile,
            then you will need all the help you can get.

            John Roth[color=blue]
            >
            > regards,
            >
            > Hung Jung[/color]


            Comment

            • Robin Munn

              #7
              Re: dynamic typing question

              Hung Jung Lu <hungjunglu@yah oo.com> wrote:[color=blue]
              > claird@lairds.c om (Cameron Laird) wrote in message news:<vuojf5kc3 v1lca@corp.supe rnews.com>...[color=green]
              >> 1. Why, in your mind or your teammate's,
              >> is dynamic typing a "lack"? What, pre-
              >> cisely, is the benefit of static typing?
              >> There are a number of legitimate
              >> answers. It occurs to me that, without
              >> precision on which interest you, we
              >> might be missing an opportunity to
              >> clarify "The Python Way" significantly.[/color]
              >
              > One static typing advantage I've run into:
              >
              > When you change the name of a variable in a class, and re-compile the
              > program, the compiler shows you ALL places where compilation fails.
              > These could be hundreds of places in dozens of files. In dynamically
              > typed language like Python, you have to rely on text search, which
              > often yields many false positives, especially for common/overloaded
              > names like .count, .name, .type, etc. In statically-typed languages,
              > making name changes is not very painful, since the compiler will tell
              > you where exactly you need to follow up with the changes. In
              > dynamically typed language, you will have to manually write unit test
              > codes to ensure name consistency.
              >
              > I am sure Python people have come up with strategies to deal with this
              > problem. That's what I'd like to hear. (Unit test is one route.) But
              > this is one place where I've found statically-typed compilers useful.
              > I mean, I have seen this discussion many times, but most responses
              > from Python users have not been realistic (often simply shrugging off
              > the problem and saying something like "compilers don't detect all the
              > bugs, blah blah blah".) I would like to hear more real-life experience
              > rather than academic conjectures.[/color]

              That sounds like exactly the sort of problem that the Bicycle Repair Man
              project (http://sourceforge.net/projects/bicyclerepair/) is intended to
              solve. It's a refactoring browser for Python code.

              Caveat: I've not actually used Bicycle Repair Man myself, so I don't
              know if there are any hidden gotchas. But I've heard very good things
              about it from other people.

              The name "Bicycle Repair Man", BTW, is a reference to a Monty Python
              skit involving a superhero whose special power was repairing bicycles.

              --
              Robin Munn
              rmunn@pobox.com

              Comment

              Working...