Re: A Use of Static Typing



I cannot get beyond the irksome idea that this is the problem with the
potential to demonstrate that zero (0) is TRUE, and -1 is FALSE. It is
seems relaible that the same function will return the same answer. I take
that answer to be a value of a mathematical expression, evaluated as TRUE or
FALSE where you compiler tests some other value, and gives an error. So
just set the true to be zero, like I hav explained so many time... Take
findings to radical poetry month reading, and see how fast your are pushed
off that stage ...

"Stefan Ram" <ram@xxxxxxxxxxxxxxxxxx> wrote in message
news:static-20070730154422@xxxxxxxxxxxxxxxxxxxxxxxxxx
Sometimes it is disputed whether static typing has
an advantage.

I sometimes change the interface of some entity, for
example

int get_difference();

is to become

double get_difference();

When I change just this entity, the compilation process
often will fail, because a site using »get_difference«
now has a type mismatch: I have to change something at
this site, too. This might create a cascade of even more
type error message, because the new change leads to
other type mismatches at other places. And so on.

Eventually all sites depending directly or indirectly on the
type of the result of »get_difference« have been found
and modified to reflect the change.

Without a static type system, I could not have used the
error messages to guide me to all those sites.

So, is this an argument in favor of static typing?



.



Relevant Pages

  • Re: How to avoid searching this folder?
    ... You should declare variables where you first use them and you should ... in the error message so you know why it failed: ... Why would $p have zero length? ... length string if there is leading whitespace in $line. ...
    (comp.lang.perl.misc)
  • Re: Zero values cause errors on log scale
    ... >>If these zero values are "real" then a log scale is not appropriate, ... > The Excel error message is infuriating because it cannot be disabled on ... > a per plot basis. ... > Martin Brown ...
    (microsoft.public.excel.charting)
  • Re: silly digital specs on analog parts
    ... and DAC registers are cleared to zero at the falling edge of ... forcing the analog outputs to zero scale. ... I've found that any error message results because I did something ...
    (sci.electronics.design)
  • Re: Customize the effect of enumerate()?
    ... you expecting that will be neither less than zero, greater than zero, ... I don't like the error message. ... tell the caller what went wrong and why it is an invalid index. ... programming that defensively, I'd write: ...
    (comp.lang.python)
  • Re: type mismatch error linked tables
    ... The records that have a zero in the CSV ... "Jeff Boyce" wrote: ... "0"s, you wouldn't have the type mismatch for THOSE queries, right? ... those record that have not yet been discharge and complete calculations ...
    (microsoft.public.access.externaldata)