comp.lang.ada
 help / color / mirror / Atom feed
From: Ken Garlington <garlingtonke@lmtas.lmco.com>
Subject: Re: To Initialise or not
Date: 1996/05/13
Date: 1996-05-13T00:00:00+00:00	[thread overview]
Message-ID: <3197715D.55EE@lmtas.lmco.com> (raw)
In-Reply-To: DrD748.ECp@world.std.com


Robert A Duff wrote:
> 
> But note that AI-51 has not yet been approved by the ARG.  This AI was
> considered at the November meeting, and I rewrote it to reflect my
> understanding of the concensus.  It will be considered again at the June
> meeting, but the current (draft) version has no official status -- it's
> just my personal opinion.

Good point. However, for at least the two cases I agree with, I can't see
the alternative, so I'm willing to accept that those will be approved.

> Well, type Character uses all the bits up on most implementations, and
> (in a packed array) Boolean uses up all the bits (namely 1 bit).  Type
> Integer uses up all the bits on most implementations.  These aren't
> things that you normally encapsulate in an "abstraction".

Well, I (and Brian Wichmann) might disagree.

More importantly, keep in mind that you want to extend the capabilities
of the language. You should expect that you will have to do some things
that "normally" aren't done. The real questions are:

1. Does the language give you the building blocks to do what you want,
with reasonable efficiency and reliability?

I think the answer here is "yes," based on my experience with GADTs and ADTs.

2. Does the language let you readily assemble these building blocks, and use
them effectively?

I'll accept that not everyone likes using a lot of ADTs.
However, I think that the power of generics
(and maybe controlled types?) certainly makes it easier to add uninit checks
to Ada than to applications coded in most other languages.

Nonetheless, you should agree that, if we limit the use of this technique
to the class of objects (Pointers) we were discussing initially, a GADT
is going to be much more readable, reliable, and modifiable (e.g converting between
accesses and integers) than your coding standard, and with almost no
additional source code. In fact, if your coding standard requires the declaration
of No_Particular... for each type, the number of source lines may be _less_
(assuming you count each instantiation as one source line vs. two source lines
for each access type using your coding standard).

So, I'm still back to the core issue. Why do the explicit intialization to
the literal "null", when there's much more effective approaches to solving your
pointer problems for almost no additional cost (and maybe less cost)?

> 
> - Bob

-- 
LMTAS - "Our Brand Means Quality"




  reply	other threads:[~1996-05-13  0:00 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-04-29  0:00 To Initialise or not Steve O'Neill
1996-04-29  0:00 ` Ken Garlington
1996-04-29  0:00   ` Robert Dewar
1996-04-30  0:00     ` Ken Garlington
1996-04-30  0:00   ` Robert A Duff
1996-04-30  0:00     ` Ken Garlington
1996-04-30  0:00       ` Robert A Duff
1996-05-01  0:00         ` Keith Thompson
1996-05-01  0:00           ` Theodore E. Dennison
1996-05-01  0:00             ` Robert A Duff
1996-05-02  0:00               ` Michael F Brenner
1996-05-02  0:00                 ` Robert A Duff
1996-05-04  0:00                   ` Kevin D. Heatwole
1996-05-02  0:00               ` Theodore E. Dennison
1996-05-02  0:00                 ` Chris Warack <sys mgr>
1996-05-02  0:00                   ` Robert A Duff
1996-05-06  0:00                   ` Ken Garlington
1996-05-02  0:00                 ` Robert A Duff
1996-05-06  0:00               ` Ken Garlington
1996-05-07  0:00                 ` Robert A Duff
1996-05-08  0:00                   ` Ken Garlington
1996-05-08  0:00                     ` Robert A Duff
1996-05-09  0:00                       ` Ken Garlington
1996-05-09  0:00                         ` Robert A Duff
1996-05-01  0:00             ` Dale Stanbrough
1996-05-02  0:00             ` Robert Dewar
1996-05-02  0:00               ` Theodore E. Dennison
1996-05-02  0:00               ` Robert A Duff
1996-05-01  0:00           ` Robert A Duff
1996-05-02  0:00             ` Keith Thompson
1996-05-03  0:00               ` Robert A Duff
1996-05-06  0:00           ` Ken Garlington
1996-05-06  0:00         ` Ken Garlington
1996-05-07  0:00           ` Robert A Duff
1996-05-08  0:00             ` Ken Garlington
1996-05-09  0:00               ` Robert A Duff
1996-05-10  0:00                 ` Robert A Duff
1996-05-10  0:00                   ` Ken Garlington
1996-05-10  0:00                     ` Robert A Duff
1996-05-10  0:00                       ` Ken Garlington
1996-05-11  0:00                         ` David Kristola
1996-05-11  0:00                           ` Robert A Duff
1996-05-11  0:00                         ` Robert A Duff
1996-05-13  0:00                 ` Ken Garlington
1996-05-13  0:00                   ` Ken Garlington
1996-05-13  0:00                     ` Robert A Duff
1996-05-13  0:00                       ` Ken Garlington [this message]
1996-05-13  0:00                   ` Robert A Duff
1996-05-13  0:00                     ` Ken Garlington
1996-04-30  0:00     ` Robert A Duff
1996-05-01  0:00     ` Patrick Richard Wibbeler
1996-05-06  0:00       ` Ken Garlington
replies disabled

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