Re: Global = root of all evil
- Posted by Pete Lomax <petelomax at blueyonder.co.uk> Nov 05, 2006
- 560 views
On Sat, 04 Nov 2006 05:27:32 -0800, Derek Parnell <guest at RapidEuphoria.com> wrote: >> >Pete Lomax wrote: >> >> PS eg fr:f(fr:x(),y(),fr:z()) should flag the y() missing namespace, >> > fr:f( fr:x(), this:y(), fr:z() ) >Just to clarify, are you saying that for code to ensure that >references to identifiers in its own file are unambiguous, that a file >must include itself with a namespace id and use that namespace in the >references. Correct, if there is a clash. This is/was an "aggressive" response to "Global = root of all evil". <snip> >one would always like local indentifiers to be unambiguous <snip> Agreed. It dawns on me that playing devils advocate just failed Where I really fell down on this thread is the argument that "globals are the root of all evil" vs "too painful to enforce them properly". I'll back down now, if that's ok, in truth I'm fairly happy with the way things are. I guess I was trying to say something along the lines of "you can't really fix these things", but the moment's passed. >What are you thoughts regarding the idea of using namespaces to prevent >potential clashes? > >And what about using them as a form of documentation for code readers? Yep, you win, sound uses both! ) Regards, Pete PS: I believe I owe an apology here, particularly to ags. It was a complete over-reaction, no offense meant. Sorry if any taken.