RE: Eu's poor design
- Posted by Matt Lewis <matthewwalkerlewis at yahoo.com> Aug 18, 2003
- 466 views
> From: Andreas Rumpf [mailto:pfropfen at gmx.net] > Derek Parnell wrote: > > I'll send you an implementation of stacks, if you like that > > demonstrates my assertion. > > I guess, I already know your implementation: You use a global > sequence which contains all the stacks and use an index to > access a particular one. We had this. OK, first, he's not going to use a 'global' variable. He'll use a 'local' variable. That's contained within a file's scope, so no globals are required. Perhaps it's better to think about this as 'static'. Either way. It seems that what you'd like to do is store the stack itself outside of the stack code's source file, and pass it by reference. You could still do somehting like this, albeit without the pass by reference (think append/prepend). It wouldn't be very elegant, but that's what you get for forcing a design. But what's the point/difference/advantage? Matt Lewis