From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,34257fd17abeba14 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!130.59.10.21.MISMATCH!kanaga.switch.ch!news-zh.switch.ch!switch.ch!cernne03.cern.ch!cern.ch!news From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: [SPARK] Code safety and information hiding Date: Tue, 22 Aug 2006 09:16:16 +0200 Organization: CERN - European Laboratory for Particle Physics Message-ID: References: <%%QFg.913090$084.629274@attbi_s22> <2SnGg.6629$aJ.3371@attbi_s21> NNTP-Posting-Host: abpc10883.cern.ch Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: sunnews.cern.ch 1156230976 10786 (None) 137.138.37.241 X-Complaints-To: news@sunnews.cern.ch User-Agent: Thunderbird 1.5.0.5 (X11/20060801) In-Reply-To: Xref: g2news2.google.com comp.lang.ada:6312 Date: 2006-08-22T09:16:16+02:00 List-Id: Bj�rn Persson wrote: >>> Now each main subprogram that was a subprogram (Ada doesn't have >>> subroutines) in the original has its own local variables. >> >> Which are global relatively to the process, and local relatively to the >> distributed system as a whole. > > No. They're declared inside the main subprogram and not visible to any > library-level packages, so they aren't truly global. This is just hiding from discussion. :-) If you rigorously stick to some chosen definition, then you can argue that such variables are not global. But I will argue that a variable which is visible everywhere in the program (in the sense that every executable piece of code can access this variable) is effectively global in that program - it's the visibility in any given scope the makes something global or local, all the rest is only syntax. Criticising the use of global variables without considering the full context of the given system is somewhat orthodox, even more so if only syntax is considered to be a distinguishing factor. I can imagine a program that uses global variables where "encapsulating" them into separate package(s) would only add clutter, without any real benefit. -- Maciej Sobczak : http://www.msobczak.com/ Programming : http://www.msobczak.com/prog/