Re: Static vs. Dynamic typing (big advantage or not)---WAS: c.programming: OOP and memory management

From: Jeff Brooks (jeff_brooks_at_nospam.com)
Date: 08/19/04


Date: Thu, 19 Aug 2004 05:15:53 GMT

Kelly Hall wrote:

> Jeff Brooks wrote:
>
>> The problem is static type checking is a very weak form of testing.
>
> That's because most programming languages have very weak type systems. I
> strongly advocate beefier type systems.

So you assume that most people make type errors? I think you actually
mean "i strongly advocate beefier static checking".

> > The
>
>> additional overhead that most static type languages require from the
>> programmer slows down development.
>
> Yes. But I almost never complain about the time it takes me to take my
> code from the editor to a clean compile (ie, remove type errors and type
> warnings). On the contrary: I find the time I spend removing compiler
> warnings to generally pay off compared to finding bugs at run time.

Most warnings are not related to type checking.

>> It takes more time before I can run unit tests which provides superior
>> testing.
>
> As long as you're willing to write every test case you care about - no
> wonder you want to spend less time in the editor :) As a formal methods
> guy, I'd much rather write one proof and ignore a whole class of test
> cases. Ideally, my compiler would do most of the proofs for me. But
> we're not there yet - more's the pity.

You still have to test the logic. If you test the logic you also test
the majority of the type usage in a dynamic language.

Jeff Brooks



Relevant Pages

  • Re: Static vs. Dynamic typing (big advantage or not)---WAS: c.programming: OOP and memory management
    ... >> The problem is static type checking is a very weak form of testing. ... > That's because most programming languages have very weak type systems. ...
    (comp.object)
  • Computer Languages
    ... the number of languages known to be spoken by the peoples of ... all the computer languages have sprung up in just 50 ... any pair of human languages. ... Almost all programming languages are built on the ...
    (soc.retirement)
  • Re: Why is OO Popular?
    ... This research allows us to understand the basics of understanding ... Another way of putting it is we can program different types of languages ... try to formalize them for programming purposes while the brain is much ... they don't like like dynamic programming languages. ...
    (comp.object)
  • googling for fun (and profit...? naah!-)
    ... python ruby perl caml java haskell lisp eiffel sml scheme ... with the programming languages as I thought of them. ... programming isn't as popular a term as I'd have thought (but still, ...
    (comp.lang.python)
  • PLMMS 2009: First Call for Paper
    ... The ACM SIGSAM 2009 International Workshop on Programming Languages ... for Mechanized Mathematics Systems will be co-located with TPHOLs 2009. ... Final Papers Due: July 10, ...
    (sci.math.symbolic)