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,e80a1497a689d8a5 X-Google-Attributes: gid103376,public From: "Robert I. Eachus" Subject: Re: Ammo-zilla Date: 1999/10/29 Message-ID: <3819C484.224F12C9@mitre.org>#1/1 X-Deja-AN: 542097806 Content-Transfer-Encoding: 7bit References: <38120FAF.945ADD7D@hso.link.com> <7uutgd$87h$1@nnrp1.deja.com> <19991024.18033546@db3.max5.com> <38189268.43EB150F@mail.earthlink.net> <86ogdjtdwz.fsf@ppp-115-70.villette.club-internet.fr> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@news.mitre.org X-Trace: top.mitre.org 941212470 10092 129.83.41.77 (29 Oct 1999 15:54:30 GMT) Organization: The MITRE Corporation Mime-Version: 1.0 NNTP-Posting-Date: 29 Oct 1999 15:54:30 GMT Newsgroups: comp.lang.ada Date: 1999-10-29T15:54:30+00:00 List-Id: Laurent Guerby wrote: > Quite the contrary, garbage collection is allowed (but not mandated) > by the language (see section 13.11.3 of the Ada 95 RM), and it's of > course available for Ada compilers targetting the JVM. Actually there are some types for which it is mandated: "Implementation Requirements "No storage associated with an Unbounded_String object shall be lost upon assignment or scope exit." RM A.4.5(88) And those for which it is not recommended: "Implementation Advice "Bounded string objects should not be implemented by implicit pointers and dynamic allocation." However I think that one of the easiest and most needed language extensions is to have storage pools with reference counting and with garbage collection predefined. (Probably as generic children of Ada.Finalization.) The first is easily written in a portable manner, but doing GC right for arbitrary types requires compiler support/modifications. (There are various methods, but all require that access values for that storage pool contain more than a simple pointer.) You can create a storage pool with garbage collection semantics without compiler support, but it requires discipline on the part of the programmer. (For example, you create a handle type, and objects designated by handles are treated as referenced during GC, while pointers and 'Access do not cause an object to be recognized as in use.) -- Robert I. Eachus with Standard_Disclaimer; use Standard_Disclaimer; function Message (Text: in Clever_Ideas) return Better_Ideas is...