comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: begin clause in package bodies
Date: Fri, 1 Dec 2017 17:29:16 +0100
Date: 2017-12-01T17:29:16+01:00	[thread overview]
Message-ID: <ovs00s$9bd$1@dont-email.me> (raw)
In-Reply-To: <7732b88c-5911-4857-a9c8-e5a719043b26@googlegroups.com>

On 12/01/2017 02:05 PM, Mehdi Saada wrote:
> Ok. But it has to be a limited practice right ?
> I read using package with internal states or global variable was bad, regards to hiding implementation details, further development and concurrent programming. Less a problem Using a generic than can be instanced anywhere though.

There's nothing wrong with a package with internal state. This is the standard 
implementation of a singleton object in Ada. If the package is not task safe, 
that should be noted clearly in the package spec. It's also possible for such 
packages to be task safe.

-- 
Jeff Carter
"We call your door-opening request a silly thing."
Monty Python & the Holy Grail
17


      parent reply	other threads:[~2017-12-01 16:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-30 23:28 begin clause in package bodies Mehdi Saada
2017-12-01  0:09 ` Anh Vo
2017-12-01 10:54 ` Jeffrey R. Carter
2017-12-01 13:05 ` Mehdi Saada
2017-12-01 13:20   ` Dmitry A. Kazakov
2017-12-01 14:59   ` Simon Wright
2017-12-01 15:15     ` Mehdi Saada
2017-12-01 15:52       ` Dmitry A. Kazakov
2017-12-01 22:23         ` Randy Brukardt
2017-12-01 22:26     ` Randy Brukardt
2017-12-01 16:29   ` Jeffrey R. Carter [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox