Re: Migrating a system incrementally. Was: Re: Static vs. Dynamic typing (big advantage or not)---WAS: c.programming: OOP
From: Robert C. Martin (unclebob_at_objectmentor.com)
Date: 07/24/04
- Next message: Robert C. Martin: "Re: Migrating a system incrementally. Was: Re: Static vs. Dynamic typing (big advantage or not)"
- Previous message: Robert C. Martin: "Re: Migrating a system incrementally. Was: Re: Static vs. Dynamic typing (big advantage or not)---WAS: c.programming: OOP"
- In reply to: Alan Balmer: "Re: Migrating a system incrementally. Was: Re: Static vs. Dynamic typing (big advantage or not)---WAS: c.programming: OOP"
- Next in thread: Phlip: "Re: Migrating a system incrementally. Was: Re: Static vs. Dynamic typing (big advantage or not)"
- Reply: Phlip: "Re: Migrating a system incrementally. Was: Re: Static vs. Dynamic typing (big advantage or not)"
- Reply: Ian Upright: "Re: Migrating a system incrementally. Was: Re: Static vs. Dynamic typing (big advantage or not)---WAS: c.programming: OOP"
- Reply: Donald Roby: "Re: Migrating a system incrementally. Was: Re: Static vs. Dynamic typing (big advantage or not)---WAS: c.programming: OOP"
- Reply: Alan Balmer: "Re: Migrating a system incrementally. Was: Re: Static vs. Dynamic typing (big advantage or not)---WAS: c.programming: OOP"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 23 Jul 2004 22:33:57 -0500
On Fri, 23 Jul 2004 09:09:07 -0700, Alan Balmer <albalmer@att.net>
wrote:
>On Thu, 22 Jul 2004 23:59:03 -0500, Robert C. Martin
><unclebob@objectmentor.com> wrote:
>
>>On 22 Jul 2004 01:38:05 -0700, oliver@plohmann.com (Oliver Plohmann)
>>wrote:
>>
>>>Once you have your test suits you can change things must quicker with
>>>static typing. You just don't make that many errors to begin with that
>>>your test cases would have to catch.
>>
>>I've never seen anyone make that argument before. It's certainly
>>quite different from my own experience. Perhaps it's just different
>>strokes for different folks.
>
>You must remember that we non-xtreme programmers do not deliberately
>produce lousy code just for the pleasure of Refactoring it. We still
>believe in the old-fashioned notion of knowing what it is you're
>trying to do and getting it right the first time.
Good for you. How many times have you gotten it right the first time.
Compiled and executed perfectly the very first time? No errors, no
warnings, no failures.
I may be a really lousy programmer, but in my 30+ years as a
professional programmer I have yet to get it right the first time.
(Though I did get it right the second time once about 25 years ago for
a small assembly language program that I wrote.)
>>>Secondly, your test cases are
>>>never complete. The compiler will also catch things your test cases
>>>don't cover.
>>
>>True. But IME the cost of the static typing outweighs that
>>difference.
>
>Cost? Do you mean the extra 10 milliseconds of build time, or lack of
>design flexibility, or what?
Build time is *significantly* longer. In C++ it is a function of the
square of the number of lines of code. In Java it's something greater
than linear (probably n log n, but I haven't worked it out). In a
dynamically typed language build time is zero.
Design flexibility is strongly constrained in a statically typed
system. Especially one that does not allow multiple inheritance.
Trying to get the types just right take a considerable amount of time
and effort.
(Remember, I am a Java, C#, and C++ programmer by trade. Those are my
languages of choice. I know something about the costs of static
typing.)
-----
Robert C. Martin (Uncle Bob)
Object Mentor Inc.
unclebob @ objectmentor . com
800-338-6716
"The aim of science is not to open the door to infinite wisdom,
but to set a limit to infinite error."
-- Bertolt Brecht, Life of Galileo
- Next message: Robert C. Martin: "Re: Migrating a system incrementally. Was: Re: Static vs. Dynamic typing (big advantage or not)"
- Previous message: Robert C. Martin: "Re: Migrating a system incrementally. Was: Re: Static vs. Dynamic typing (big advantage or not)---WAS: c.programming: OOP"
- In reply to: Alan Balmer: "Re: Migrating a system incrementally. Was: Re: Static vs. Dynamic typing (big advantage or not)---WAS: c.programming: OOP"
- Next in thread: Phlip: "Re: Migrating a system incrementally. Was: Re: Static vs. Dynamic typing (big advantage or not)"
- Reply: Phlip: "Re: Migrating a system incrementally. Was: Re: Static vs. Dynamic typing (big advantage or not)"
- Reply: Ian Upright: "Re: Migrating a system incrementally. Was: Re: Static vs. Dynamic typing (big advantage or not)---WAS: c.programming: OOP"
- Reply: Donald Roby: "Re: Migrating a system incrementally. Was: Re: Static vs. Dynamic typing (big advantage or not)---WAS: c.programming: OOP"
- Reply: Alan Balmer: "Re: Migrating a system incrementally. Was: Re: Static vs. Dynamic typing (big advantage or not)---WAS: c.programming: OOP"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|