Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!feeder.erje.net!eu.feeder.erje.net!news-2.dfn.de!news.dfn.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Ian Collins Newsgroups: comp.programming Subject: Re: Globals/"static" access in OO languages. (Was: Singleton quintessence) Date: Sun, 15 Sep 2013 17:18:39 +1200 Lines: 21 Message-ID: References: <179c6d53-7d84-438d-8047-b7fd8038a2cf@googlegroups.com> <52353ca9$0$44511$862e30e2@ngroups.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net eJrN208hhIeR70bPlkG3kA1K9w7yxNg4kRy+qqOTdF44ujEvSM Cancel-Lock: sha1:ATGJd1K6g/Zi7/IARzWxsrxAM6g= User-Agent: Mozilla/5.0 (X11; SunOS i86pc; rv:17.0) Gecko/17.0 Thunderbird/17.0 In-Reply-To: <52353ca9$0$44511$862e30e2@ngroups.net> Xref: csiph.com comp.programming:3737 Robert Miles wrote: > On 9/14/2013 1:31 PM, Daniel Pitts wrote: >> On 9/14/13 11:14 AM, Richard Damon wrote: >>> On 9/9/13 6:09 PM, Daniel Pitts wrote: > [snip] >> Hmm, I could see the entry point of the program accepting a "System" >> object, which provides access to those resources. >> >> At the same time, I'm not really sure those are the same concept as >> static. Perhaps behind the scenes they are. So system calls may need >> to access "static" data, but the application itself wouldn't directly >> access static/global data. >> > At least in C, "static" means that the value(s) of the object never > change as the program runs; this is used mainly to tell the compiler > that it can use optimizations that depend on these values never changing. s/static/const/ -- Ian Collins