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: bobduff@world.std.com (Robert A Duff) Subject: Re: Uninitialized "out" parameters Date: 1996/07/23 Message-ID: #1/1 X-Deja-AN: 169718460 references: <31EEACDA.64880EEB@sage.inel.gov> <4stagp$3vg@mulga.cs.mu.OZ.AU> <4t2gb4$a10@mulga.cs.mu.OZ.AU> organization: The World Public Access UNIX, Brookline, MA newsgroups: comp.lang.ada Date: 1996-07-23T00:00:00+00:00 List-Id: In article <4t2gb4$a10@mulga.cs.mu.OZ.AU>, Fergus Henderson wrote: >I haven't seen your example. I tried searching for it using dejanews, >but I did not find any article in this thread posted by you that >gave an example of a 2 gig array. I haven't seen it, either, but I can guess what Robert meant. You declare an array (1..One_Zillion), and you trust the operating system to *not* create storage for most of that array. Normally, you just set the first few elements, and the others are memory-mapped to non-existent storage. If you were required to say ":= (others => something);", then the compiler might actually cause writes to all that memory, causing the OS to actually allocate it, causing Storage_Error, or perhaps just a huge waste of memory. On the other hand, if "something" happens to be, say, "0", then some operating systems can deal with it by initializing memory pages to zero as they are needed. The compiler has to know about that fact, and act accordingly. The DEC Ada-83 compiler on VAX/VMS does this. >But, even without seeing your example, I'm pretty confident that a >statically decidable system could handle those sorts of thing. In general? I skept. >In fact, for any given set of examples, there is _guaranteed_ to be >_some_ statically decidable system which handles those examples! True, but the compiler has to know about those examples, or at least that sort of example. >Whether such a system could also be useful, orthogonal, practical, etc. >is of course another question; we'd have to see the examples in >question to be able to judge. I still prefer run-time checks in this case. - Bob