From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: [SPARK] Code safety and information hiding
Date: Mon, 21 Aug 2006 21:58:13 +0200
Date: 2006-08-21T21:58:08+02:00 [thread overview]
Message-ID: <i413r5sa76uh.1n497rro9sm9l$.dlg@40tude.net> (raw)
In-Reply-To: 2SnGg.6629$aJ.3371@attbi_s21
On Mon, 21 Aug 2006 19:31:10 GMT, Jeffrey R. Carter wrote:
> 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.
Packages have scope. Is a variable in the specification of a nested package
"truly" global? Clearly, both "global" and "local" are relative to the
given scope. The third possible status is "orthogonal" (exists in a sibling
scope).
>> 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.
Which are global relatively to the process, and local relatively to the
distributed system as a whole.
> 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.
Which is true without any chopping. Descending a hierarchy of scopes makes
some things global without changing anything.
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
next prev parent reply other threads:[~2006-08-21 19:58 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-16 7:56 [SPARK] Code safety and information hiding Maciej Sobczak
2006-08-16 8:53 ` roderick.chapman
2006-08-16 11:18 ` Stuart
2006-08-16 13:23 ` Maciej Sobczak
2006-08-16 19:49 ` [SPARK] " Jeffrey R. Carter
2006-08-17 7:01 ` Maciej Sobczak
2006-08-17 18:08 ` Jeffrey R. Carter
2006-08-17 20:00 ` Björn Persson
2006-08-18 1:22 ` Jeffrey R. Carter
2006-08-18 19:39 ` Björn Persson
2006-08-19 5:35 ` Jeffrey R. Carter
2006-08-19 12:47 ` Björn Persson
2006-08-20 3:58 ` Jeffrey R. Carter
2006-08-20 11:35 ` Björn Persson
2006-08-18 23:02 ` Robert A Duff
2006-08-19 5:40 ` Jeffrey R. Carter
2006-08-19 9:49 ` Stephen Leake
2006-08-20 3:52 ` Jeffrey R. Carter
2006-08-20 19:06 ` Stephen Leake
2006-08-21 1:07 ` Jeffrey R. Carter
2006-08-21 7:25 ` Maciej Sobczak
2006-08-21 19:31 ` Jeffrey R. Carter
2006-08-21 19:58 ` Dmitry A. Kazakov [this message]
2006-08-21 21:06 ` Björn Persson
2006-08-22 7:16 ` Maciej Sobczak
2006-08-22 9:45 ` Björn Persson
2006-08-22 12:42 ` Maciej Sobczak
2006-08-22 7:27 ` Dmitry A. Kazakov
2006-08-21 11:30 ` Colin Paul Gloster
2006-08-22 10:51 ` Stephen Leake
2006-08-23 9:44 ` Peter Amey
2006-08-23 22:37 ` Jeffrey R. Carter
2006-08-24 10:55 ` Peter Amey
2006-08-24 23:33 ` Jeffrey R. Carter
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox