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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b99897135d6631cc X-Google-Attributes: gid103376,public Path: g2news1.google.com!news1.google.com!news.glorb.com!wn14feed!worldnet.att.net!bgtnsc05-news.ops.worldnet.att.net.POSTED!53ab2750!not-for-mail From: David Starner Subject: Re: memory management and productivity User-Agent: Pan/0.14.2.91 (As She Crawled Across the Table (Debian GNU/Linux)) Message-Id: Newsgroups: comp.lang.ada References: <40d15023$1_1@baen1673807.greenlnk.net> <40d69121$1_1@baen1673807.greenlnk.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Date: Tue, 22 Jun 2004 02:39:35 GMT NNTP-Posting-Host: 12.72.71.226 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc05-news.ops.worldnet.att.net 1087871975 12.72.71.226 (Tue, 22 Jun 2004 02:39:35 GMT) NNTP-Posting-Date: Tue, 22 Jun 2004 02:39:35 GMT Organization: AT&T Worldnet Xref: g2news1.google.com comp.lang.ada:1757 Date: 2004-06-22T02:39:35+00:00 List-Id: On Mon, 21 Jun 2004 12:03:55 -0700, Russ wrote: > Are you saying that an Ada compiler can implement GC or not? That > seems a bit inconsistent to me. How can the same language have it both > ways? Every language has it both ways. You could link the Boehm-Weiser garbage collector into a C program without any change to the source outside a couple defines on the command line. A Lisp interpreter could choose not to garbage collect memory. Like interpretation, GC is more a feature of choices and tradition than an enforced standard. The advantage of Ada is that the strong typing makes it possible for an advanced GC to find pointers and adjust them when moving things in memory. Ada also makes many of the small, temporary memory uses found in C unnecessary by allowing you to pass things by reference and to pass arrays. > What if someone tries to port an Ada application that has its > own memory management to an Ada compiler that already has it by > default? It depends on the code and on the GC system. If you depend on the details of memory management, then you depend on the details of memory management. If it's pure Ada, it should work; if it's not, it might not work. In any case, well-designed memory management systems are usually easy to pull out or at least write a dummy replacement for. > Which is why it should be under control of the application developer, > it seems to me. But it is. The application developer chooses which compiler to use and which flags to compile it with. If you're compiling for a LISP machine or a JVM, you probably don't have a choice whether or not to use GC. As the only Ada compilers with built-in GC right now are those which compile to the JVM, they don't offer a choice.