From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,803df5f3f60558d5 X-Google-Attributes: gid103376,public From: fjh@mundook.cs.mu.OZ.AU (Fergus Henderson) Subject: Re: Uninitialized "out" parameters Date: 1996/07/24 Message-ID: <4t5dkk$h6d@mulga.cs.mu.OZ.AU>#1/1 X-Deja-AN: 169932797 references: <31EEACDA.64880EEB@sage.inel.gov> <4sq614$kai@mulga.cs.mu.OZ.AU> <4stagp$3vg@mulga.cs.mu.OZ.AU> <4t1s3n$chv@goanna.cs.rmit.edu.au> organization: Comp Sci, University of Melbourne newsgroups: comp.lang.ada Date: 1996-07-24T00:00:00+00:00 List-Id: dewar@cs.nyu.edu (Robert Dewar) writes: >Dynamic bounds of arrays do not help in compile time legality checking, so >I don't see what relevance they have. And yes, container types are certainly >appropriate (after all see Bounded_String, which is exactly what you are >talking about), but again, this has nothing to do with compile time legality >requirements. I think it does have relevant to the compile time legality requirements. Many container types have an interface that has no possibility of accessing uninitialized variables even if their implementation might make use of uninitialized arrays used in ways that might make it difficult for a static checking system to ensure their safety. For example, if the standard library has a `sparse_hash_table' type, it should solve the problem you mentioned with the 2 gig array. The down side of strict static checking is that it might make some idioms, such as an efficient implementation of the `sparse_hash_table' interface, difficult to express. The relevance of using containers with higher levels of abstraction than arrays is that it allows you to combine efficient implementations with strict static checking while minimizing any loss of expressiveness. -- Fergus Henderson | "I have always known that the pursuit WWW: | of excellence is a lethal habit" PGP: finger fjh@128.250.37.3 | -- the last words of T. S. Garp.