Steve Leach said:
> The usual problem with these simpler examples is that everyone want to
> pile in and explain how it isn't the fault of strong typing but the fools
> that use it. I anticipate remarks along the lines of -fgetc- is "broken"
> and no one writes interfaces like this anymore .... and I offer in
> return the following -- straight off the Javasoft site.
Is "strong" the right adjective. Don't we mean "static"? I'd say that
C is weakly statically typed. There's just nothing strong about
its type system. Java's is stronger, SML's stronger still. Though
it's perhaps better to make a distinction between "sound" typing
and "strong" typing. On a scale of 0-9 for soundness, strength
C SML Scheme Pop11 Java
static Y Y N N Y
sound 0 9 9 5 9
strong 3 9 3 5 6
Pop-11's 5 for soundness comes from the fast_.. functions. Pop-11 scores
as being more strongly typed than Scheme on account of the record facility.
SML is -really- strong for some tree-munching applications.
Robin.
|