comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam@spam.com>
Subject: Re: Controlled types and exception safety
Date: Sat, 10 Dec 2005 07:53:53 GMT
Date: 2005-12-10T07:53:53+00:00	[thread overview]
Message-ID: <lQvmf.1652$QQ1.321@newsread3.news.pas.earthlink.net> (raw)
In-Reply-To: <IaydnS4kbb0cdATeRVn-pw@megapath.net>

Randy Brukardt wrote:

> Probably true. I guess my point is that this can't really be done, because
> any way to make it work would be so complex so as to be impossible to get
> right or understand. And such complexity usually leads to making it too hard
> to use for the user of it as well.

Quite possibly. I agree that it gets more complex the deeper you get into it, 
and that's usually A Bad Thing. But complex and impossible are 2 different things.

I have a better understanding of the objections to this approach now. Thanks for 
that.

> Gee, I've done my best to forget that Ada 83 existed. We're on the second
> (or third, depending on how you count) major update since then.

I've always thought Ada 83 was a pretty good language, but did have things that 
needed improvement. I've already mentioned finalization; better 
low-level/bit-twiddling abilities and tightening the generic contract model are 
a couple of other obvious things.

Anyway, the discussion we've just finished having only makes sense to me as 
being about changes to Ada 83 other than those that Ada 95 made; alternatives to 
the Ada-95 way. Talking about them as changes to Ada 95 is meaningless; Ada 95 
choose a different path.

So, talking about finalizing components during assignment is meaningless, since 
Ada 83 didn't have finalization, and we haven't defined what, if any, form of 
finalization occurs in this alternative revision we were discussing.

> Limited private types that aren't limited in the full view are, for most
> purposes, the same as non-limited types. Indeed, they're arguably a mistake
> in the language (types that change limitedness are a continuing headache
> with the semantics of Ada). What's interesting is the types that are
> position-dependent, or are "really limited" -- these should never be copied,
> even inside of their full definition.

I've always found it very important for a package to be able to control what a 
client can do with its abstraction, and making the public view limited is a 
useful tool for achieving that.

-- 
Jeff Carter
"I like it when the support group complains that they have
insufficient data on mean time to repair bugs in Ada software."
Robert I. Eachus
91



  reply	other threads:[~2005-12-10  7:53 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-30 13:57 Controlled types and exception safety Maciej Sobczak
2005-11-30 15:06 ` Dmitry A. Kazakov
2005-11-30 16:19   ` Maciej Sobczak
2005-12-01  0:05     ` Stephen Leake
2005-12-01  9:21     ` Dmitry A. Kazakov
2005-12-01 10:46       ` Maciej Sobczak
2005-12-01 15:08         ` Dmitry A. Kazakov
2005-12-02  4:17           ` Randy Brukardt
2005-12-02  9:29             ` Maciej Sobczak
2005-12-02 18:12               ` tmoran
2005-12-02 19:15                 ` Robert A Duff
2005-12-02 21:42                   ` tmoran
2005-12-06  9:00                     ` Maciej Sobczak
2005-12-06  9:50                       ` Dmitry A. Kazakov
2005-12-06 18:34                         ` Jeffrey R. Carter
2005-12-06 19:34                           ` Randy Brukardt
2005-12-06 21:20                             ` Dmitry A. Kazakov
2005-12-07  1:57                             ` Jeffrey R. Carter
2005-12-08  0:50                               ` Randy Brukardt
2005-12-08 19:37                                 ` Jeffrey R. Carter
2005-12-09  2:36                                   ` Randy Brukardt
2005-12-09  6:33                                     ` Jeffrey R. Carter
2005-12-09 20:35                                       ` Randy Brukardt
2005-12-10  7:53                                         ` Jeffrey R. Carter [this message]
2005-12-06 20:43                           ` Dmitry A. Kazakov
2005-12-07  2:00                             ` Jeffrey R. Carter
2005-12-07 10:01                               ` Dmitry A. Kazakov
2005-12-02 23:21             ` Robert A Duff
2005-11-30 17:46 ` Jean-Pierre Rosen
2005-11-30 21:02 ` Jeffrey R. Carter
2005-11-30 22:06   ` Björn Persson
2005-11-30 23:52     ` Randy Brukardt
2005-12-01  5:26     ` Jeffrey R. Carter
2005-12-02 23:51       ` Robert A Duff
2005-12-06 11:41   ` Peter C. Chapin
2005-12-06 12:50     ` Jean-Pierre Rosen
2005-12-06 13:06     ` Dmitry A. Kazakov
replies disabled

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