CBFalconer wrote:
I'm glad they chose the other route. Makes type-checking quite a bit easier and, more importantly, possible at compile-time, even in such complex situations.
PascalP (out of P4) took the compatible components route, and it was quite a simple recursive function, something like:
IF primitive THEN compatible := (t1 = t2) AND (t1.lim = t2.lim) ELSE IF arrt THEN compatible := compatible(t1.ixt, t2.ixt) AND compatible(t1.ct, t2.ct) ELSE IF rect THEN ...
Yes, but if you apply this to dynamic types (conformant arrays, schemata, arrays declared with non-constant bounds), it will require runtime checks.
Frank