Re: Static vs. Dynamic typing

From: Ilja Preuß (it_at_iljapreuss.de)
Date: 09/11/04


Date: Sat, 11 Sep 2004 09:00:44 +0200

Christopher Barber wrote:

> Without static checking this will only fail if the call is actually
> executed during testing. All it takes for the static check to fail
> is for the code to be compiled.

Correct.

> Without static checks it is more
> important that your tests cover every line of code and more
> thoroughly as well.

How much more important? How comfortable are you with the idea of a call
that's only checked by the compiler - without any check of the *semantics*
of the call?

> If you consider the static declarations
> themselves to be tests, then using them really shouldn't be any worse
> than writing tests.

If they wouldn't come with costs. But they do:

- they constrain the structure of the code,
- they increase compile time significantly, and thereby delay feedback from
the tests, and
- they tend to clutter the code with redundant information

These costs are significant in a mainstream language like Java.

Cheers, Ilja



Relevant Pages

  • Re: More on Tru64
    ... and in C and many other modern languages. ... based on observation of many projects is that it costs 3 times as much to ... it in C as in PL/I. ... you don't like the cost of the compiler, ...
    (comp.os.vms)
  • Re: not able to compile fftw3 with ifc 7.1
    ... It is cheaper in the long run to get an f90/f95 ... compiler running. ... 30-year-old version of the language costs a lot of time. ... If there are existing f90 codes, then the cost of rewriting them ...
    (comp.lang.fortran)
  • Re: C90 penetration
    ... it might share with some other workplaces, ... If a company can pass increased costs on to the consumer without a net reduction in their profits, then it doesn't make sense for it to worry about those costs. ... When that is the case, the company does need to cut costs, and that means it should consider the possibility that it does in fact need a C compiler, in the sense that the compiler might save them more money in the long run than it would cost to buy it. ... That someone might have failed to do a sufficiently detailed analysis to justify the decision would not surprise me; that was, in fact, the point of my criticism. ...
    (comp.lang.c)
  • Re: Microcontroller Family Selection Guide
    ... Benchmarks on our C6808 compiler tools show that code generated ... costs between 2 and 3 man days. ... I am not familiar with the RS08, but comparing it with older chips ...
    (comp.arch.embedded)
  • Re: Preview Version of DiamondBack...
    ... > opportunity to others when it costs you absolutely nothing to do so? ... Ask me again when Delphi is the only compiler in existence. ...
    (borland.public.delphi.non-technical)