C strongly typed?

Magnus Rimvall rimvallm at jupiter.crd.ge.com
Fri Mar 9 03:02:46 AEST 1990


In article <2963 at goanna.oz.au> you write:
>
>	declare
>	    subtype apple  is integer;
>	    subtype orange is integer;
>	    a: apple;
>	    o: orange := 1;
>	begin
>	    a := o;
>	end
>Again, the assignment is well-typed.  Why should C be different?

and thereby attempt to imply that Ada, C and Pascal have an equal
(lack of) strong typing and type checking.

Obviously, you either know very little about Ada or you deliberately
try to misinform the reader.

If your Ada example had read as follows:

	declare
	    type apple  is NEW integer;
	    type orange is NEW integer;
	    a: apple;
	    o: orange := 1;
	begin
	    a := o;
	end

the a:=o assignment would have been illegal, and would have
been caught AT COMPILE TIME by any Ada compiler.

Magnus Rimvall



More information about the Comp.lang.c mailing list