Re: The use of modules (or not)



"Robin Tucker" <idontwanttobespammedanymore@xxxxxxxxxxxxxxx> wrote in
news:d9900l$k7f$1$8300dec7@xxxxxxxxxxxxxxxx:
> If you really want to use globals, google for the singleton pattern.
> There is absolutely nothing wrong with "global" variables in this
> context, as long as they are managed properly and you protect the

You dont need a singleton to make globals. Its really easy. Declare a new class, and add some
public static (shared in VB) fields, thats it.


--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"

Empower ASP.NET with IntraWeb
http://www.atozed.com/IntraWeb/
.



Relevant Pages

  • Re: Singleton Pattern
    ... that uses the singleton pattern to create just about everything. ... When you skip globals and start to pass variables ... you alter your design so that you don't have to do that as ... you discover that not everything needs the database and your design ...
    (comp.object)
  • Re: The use of modules (or not)
    ... If you really want to use globals, google for the singleton pattern. ... is absolutely nothing wrong with "global" variables in this context, ...
    (microsoft.public.dotnet.languages.vb)
  • Re: The use of modules (or not)
    ... Yes thats true - and of course if you are using the singleton pattern, ... singleton object can be the only instance. ... >> If you really want to use globals, ...
    (microsoft.public.dotnet.languages.vb)
  • Re: scope of static?
    ... when one declares some public method or variable ... A static exists within the scope of a class loader. ... instance field is global within the context of an instance". ... I have seen "globals" that exist within the context of a JVM; ...
    (comp.lang.java.help)
  • Re: Looking for real world examples to explain the difference between procedural (structured?) progr
    ... stateless. ... quaternion support, ... ... obviously you do need a context because you are ... I usually use context structs (as opposed to globals) for most things, ...
    (comp.object)