|
Re: Name spaces in Dolphin...
panu wrote:
> I recently (just for fun/interest in how it'd turn out) chose to
> implement a
> > small toy project in a style where all responsibility for creating
> > objects (and hence all references to classes) were the responsibility
> > of a single system-wide object.
>
> Right. But that is *your* system-wide object.
> What if you want to load some-one else's code
> into your image?
The relevance is that since "my" classnames are hidden, and there is only the
one "global" identifier, all the actual classnames can be (and are) long and
descriptive without impacting clients of my code (if there were any). That in
itself makes it highly unlikely that I/they will experience clashes. Also the
fact that all (just about) references to classnames from inside the module are
centralised in the 'Music' object means that changing them is extra specially
easy -- should the need ever arise.
There is, of course, no way that I can write *my* code such that it reduces the
possibility of name clashes between two separate third parties.
Well, not unless I go ahead and implement my "non-intrusive namespaces"
suggestion from elsewhere in this thread -- I'm getting increasingly tempted to
have a pop at it, it looks quite easy to do a bare-bones (little/no tools
support, global identifiers only, no selector namespaces) implementation.
-- chris
|