"Jeffrey Carter" a �crit dans le message de news:8sQmc.11414$V97.6807@newsread1.news.pas.earthlink.net... > Jean-Pierre Rosen wrote: > > > > But you don't depend logically on something that you don't with. With > > tagged types, you are really calling an implementation (in another > > package) of something that you depend on - which is defined in a > > package that you have withed. > > To my way of thinking, you depend on any types you may have objects of > and anything you may invoke. A derived type is not the same type as its > parent, nor are its operations the same as its parent's operations. > Since type extension is a form of type derivation, I apply the same > rules to type extension that I did to type derivation in Ada 83: the > parent must be either a predefined type, or a type declared in the same > declarative region as the child. Anything else quickly becomes unreadable. > But tagged types (OOP actually) is just about that: being able to add types later, without requiring recompiling existing modules that use the class. I understand that you may not like that; in this case, just don't use tagged types. It was a very deliberate decision to prevent tagged types from invading the whole language, precisely for this reason: they have no effect on people who don't use them. -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr