August 25, 2001 Re: More Useful (but Complex) Imports | ||||
---|---|---|---|---|
| ||||
Posted in reply to Florian Weimer |
> (Namespaces in the C++ sense are of course a pain in the neck. I hope no one considers them for any new language.)
What's wrong with them? That's one feature I hadn't heard any problems
about before. They were an improvement over what I've had in the other
languages I've used.
Dan
|
August 27, 2001 Re: More Useful (but Complex) Imports | ||||
---|---|---|---|---|
| ||||
Posted in reply to Dan Hursh | Dan Hursh <hursh@infonet.isl.net> writes: > > > (Namespaces in the C++ sense are of course a pain in the neck. I hope no one considers them for any new language.) > > What's wrong with them? It is hard to design a reasonable separate compilation model around them because each compilation unit can open any namespace and define things in it. In addition, namespaces do not address at all the problem of the correct order of initialization of subsystems. -- Florian Weimer Florian.Weimer@RUS.Uni-Stuttgart.DE University of Stuttgart http://cert.uni-stuttgart.de/ RUS-CERT +49-711-685-5973/fax +49-711-685-5898 |
August 27, 2001 Re: More Useful (but Complex) Imports | ||||
---|---|---|---|---|
| ||||
Posted in reply to Florian Weimer | Florian Weimer wrote:
> Charles Hixson <charleshixsn@earthlink.net> writes:
>
>
>>Are you sure? I suspect that it would depend a lot on implementation
>>details. Eiffel does quite will with a non-hierarchical
>>name-space.
>>
>
> Ada 95 added child units to Ada 83 (the Ada "namespace" has always
> been hierarchical in some sense). When I look at my Ada code, I can
> hardly imagine what I would do without this feature. Admittedly, Ada
> associates visibility with the package hierarchy, so there is a very
> natural way to use a package hierarchy to model a hierarchy of
> classes, but I still think this is a nice feature even if this strong
> connection isn't there.
>
> (Namespaces in the C++ sense are of course a pain in the neck. I hope
> no one considers them for any new language.)
>
>
But Ada95 has packages that are sort of orthogonal to the tagged types. So you do have a partial lattice structure of -- if not of inheritance, of dependancy. And I don't think inheritance is too strong a term. It's not quite what a normal OO language would call inheritance, but then neither is Ada a normal OO language.
So the code isn't actually hierarchical. It's more of a lattice structure, though their is a main line of inheritance that the child packages and tagged types follow.
To me this feels a bit like the families that trace their descent through the paternal line, and ignore who the mothers were. Silly. One half is just as important as the other. (Frequently more so, when the official line of inheritance is disemboweled, and replaced by code from a totally different line.)
Multiple inheritance is more like the code actually operates. An inheritance tree is how the user interface operates. So ideally there would be a way to specify both. Unfortunately, the way this usually gets done is with a bunch of one line forwarding functions. It's flexible, but I can't think of anything else to reccommend it.
|
August 27, 2001 Re: More Useful (but Complex) Imports | ||||
---|---|---|---|---|
| ||||
Posted in reply to Florian Weimer | Florian Weimer wrote:
>
> Dan Hursh <hursh@infonet.isl.net> writes:
>
> >
> > > (Namespaces in the C++ sense are of course a pain in the neck. I hope no one considers them for any new language.)
> >
> > What's wrong with them?
>
> It is hard to design a reasonable separate compilation model around them because each compilation unit can open any namespace and define things in it.
>
> In addition, namespaces do not address at all the problem of the correct order of initialization of subsystems.
Oh, I never tried to depend on them for compilation techniques. I
actually like it so I can define related objects in related or nested
namespaces together. It comes in handy for small platform dependent
interfaces. Namespaces are not modules though on their own. Well not
without discipline. I'm good at discipline when I need to be. I just
like not having it forced on me.
Dan
|
Copyright © 1999-2021 by the D Language Foundation