Re: namespace-nonproblem

new topic     » goto parent     » topic index » view thread      » older message » newer message

> Let me check I got this straight.  You have 2 or more include files
> written by different people, but when you include them one attempts
> to redefine a global variable or routine or constant.

Right.

> Isn't the easiest course of action to edit the offending source file
> and change the identifier?

Well, sure, global search and replace is rarely a problem. But on the other
hand, you'll have to do this all over with a future version of the library,
and there's no guarantee that you'll get them all anyway. It's ultimately
more trouble than it's worth.

Even on computers like the Commodore 64, which I do a fair amount of work on
(currently constructing a DOOM clone for it), modules keep their own
namespaces of a sort. All of my routines have their own workspaces, and
modules communicate through predeclared tracts of shmem. So even older systems
which had no overt object encapsulation or anything like that still had
rudimentary namespace considerations.

--
Cameron Kaiser * spectre at sserv.com * http://www.sserv.com/
--
Visit the leading Internet starting point today!
http://www.sserv.com/
--

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu