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-7-bit Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns14feed!worldnet.att.net!attbi_s21.POSTED!53ab2750!not-for-mail From: "Jeffrey R. Carter" Organization: jrcarter at acm dot org User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: [SPARK] Code safety and information hiding References: <%%QFg.913090$084.629274@attbi_s22> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <2SnGg.6629$aJ.3371@attbi_s21> NNTP-Posting-Host: 12.201.97.176 X-Complaints-To: abuse@mchsi.com X-Trace: attbi_s21 1156188670 12.201.97.176 (Mon, 21 Aug 2006 19:31:10 GMT) NNTP-Posting-Date: Mon, 21 Aug 2006 19:31:10 GMT Date: Mon, 21 Aug 2006 19:31:10 GMT Xref: g2news2.google.com comp.lang.ada:6299 Date: 2006-08-21T19:31:10+00:00 List-Id: Maciej Sobczak wrote: > > It's interesting to see this discussion, especially after the posts > revealing that it's not really clear what "global" means. We were discussing "true" global variables: variables in package specifications. > Let's say I have a program composed of some subroutines or packages. > Each subroutine has some local variables and each package has some state > and together they all cooperate according to what the whole is supposed > to do. > Then I decide to break the system into separate processes, and for the > sake of discussion what was a subroutine (or a package) originally > becomes a separate process, all communicating using some form of IPC and > still cooperating to achieve the supposed goals. Now each main subprogram that was a subprogram (Ada doesn't have subroutines) in the original has its own local variables. Each main subprogram that was a package with state now has its own local variables that contain that state. > The point is that while chopping the system into pieces, what was local > (or state) variable originally became global in the resulting smaller > program. I don't see that this is necessary. -- Jeff Carter "What I wouldn't give for a large sock with horse manure in it." Annie Hall 42