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.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,29850945228df59 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-18 08:05:04 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.vmunix.org!newsfeed.stueberl.de!proxad.net!wanadoo.fr!not-for-mail From: "Jean-Pierre Rosen" Newsgroups: comp.lang.ada Subject: Re: Boehm-Demers-Weiser conservative garbage collector and GNAT Date: Wed, 18 Jun 2003 15:36:04 +0200 Organization: Adalog Message-ID: References: <1316747.mXveBPtf0Z@linux1.krischik.com> NNTP-Posting-Host: atoulouse-206-2-1-114.w81-50.abo.wanadoo.fr X-Trace: news-reader1.wanadoo.fr 1055948703 5445 81.50.133.114 (18 Jun 2003 15:05:03 GMT) X-Complaints-To: abuse@wanadoo.fr NNTP-Posting-Date: 18 Jun 2003 15:05:03 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Xref: archiver1.google.com comp.lang.ada:39396 Date: 2003-06-18T15:05:03+00:00 List-Id: "Larry Kilgallen" a �crit dans le message de news:vDKsCwFxWhWJ@eisner.encompasserve.org... > Garbage collection is important to particular problem domains like AI. > People who need it do not appear to be a significant portion of the > Ada-using public. No. Garbage collection is important to particular programming language. More specifically, if you have a language that does not allow returning objects of statically unknown size on the stack, then if you need the feature, the "server" will need to allocate the value (and return a pointer), and the "client" will be responsible for deallocation. In this case, proper deallocation is generally difficult to do properly, and having a GC can help. In Ada, we do return any value on the stack, so this need disappears. As for containers etc., it is best to hide the (pointer) implementation, and have all collection inside the container package. You don't need GC for that. Regarding the initial remark: most people doing AI use these poor languages that can return only very limited types on the stack; Therefore, they think that GC is mandatory. But from personal experience, I was always satisfied with at most finalizable type. -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr