comp.lang.ada
 help / color / mirror / Atom feed
From: Maciej Sobczak <no.spam@no.spam.com>
Subject: Re: [SPARK] Code safety and information hiding
Date: Tue, 22 Aug 2006 09:16:16 +0200
Date: 2006-08-22T09:16:16+02:00	[thread overview]
Message-ID: <eceb00$ah2$1@sunnews.cern.ch> (raw)
In-Reply-To: <bfpGg.13939$E02.5155@newsb.telia.net>

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/



  reply	other threads:[~2006-08-22  7:16 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
2006-08-21 21:06                     ` Björn Persson
2006-08-22  7:16                       ` Maciej Sobczak [this message]
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