Re: Extensible Types
From: James Giles (jamesgiles_at_worldnet.att.net)
Date: Wed, 14 Jul 2004 16:26:31 GMT
Jan Vorbrüggen wrote:
>> This means that if you change a type that you weren't aware
>> was being extended by other code, you've changed the
>> meaning of that other code (possibly without any
>> warning to the developer or maintainer of that code).
> It's unclear to me how that could actually happen. Being a non-
> SEQUENCE type, the base type must be in a module seen by all
> users. An extension doesn't touch the basic type itself (I am
> assuming...). Could you show the outline of a scenario of where
> the effect you dread actually happens?
... contains some type declarations ...
End Module A
Module B ! written by a different programmer
... contains extentions to the types in A ...
End Module B
How does the author of B necessarily know that the author
of A has changed the type declarations in A. But don't those
changes have consequences on the meaning of B's code?
-- J. Giles "I conclude that there are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies and the other way is to make it so complicated that there are no obvious deficiencies." -- C. A. R. Hoare