"Strong typing vs. strong testing"

Paul Rubin no.email at nospam.invalid
Thu Sep 30 10:02:49 CEST 2010

>> > > > in C I can have a function maximum(int a, int b) that will always
>> > > > work. Never blow up, and never give an invalid answer. If someone
>> > > > tries to call it incorrectly it is a compile error.
> The second sentence is not disproved by a cast from one datatype to
> another (which changes the value) that happens before maximum() is called.

    int maximum(int a, int b);

    int foo() {
      int (*barf)() = maximum;
      return barf(3);

This compiles fine for me.  Where is the cast?  Where is the error message?
Are you saying barf(3) doesn't call maximum?

More information about the Python-list mailing list