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-Thread: 103376,b99897135d6631cc X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local1.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Sat, 26 Jun 2004 11:33:11 -0500 Date: Sat, 26 Jun 2004 12:33:11 -0400 From: "Robert I. Eachus" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: memory management and productivity References: <40d69121$1_1@baen1673807.greenlnk.net> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 24.147.90.114 X-Trace: sv3-p9LJCALoIs6e75ZTwcLu144NZZm2EnWYu9HNoiTZVMbS4C2wKV958k4tt+7tAGSlvKLCiLjYYsYIZZp!BrVGNs+q0AJkczSFxdTvTm3prJOAYLtpdzx/u0kfNaQSMcOcxUw2r9742oNQkA== X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.1 Xref: g2news1.google.com comp.lang.ada:1929 Date: 2004-06-26T12:33:11-04:00 List-Id: Russ wrote: > Maybe you think I am just too simple minded. Well, maybe I am. But so > are a lot of other people, including many of the decision-making > managers you guys are so fond of. When they compare languages (if they > do), one thing they do is to set up a list of check boxes, and one is > for GC. As a rule of thumb, a check beats a question mark every time. Ada does not have a REQUIREMENT for garbage collection. What it has though is a requirement for no memory leaks: AdaRM A.4.5(88): Implementation Requirements No storage associated with an Unbounded_String object shall be lost upon assignment or scope exit. Those words were chosen specifically to require what garbage collection promises, but not to require any particular garbage collection scheme. If the implementor implements this using something other than garbage collection, do you as a user care? I certainly don't think about whether the object will be managed with reference counts, controlled types, or global garbage collection when I use Unbounded_String. All I need to know is that it works, and works means no storage leaks. If I don't want heap allocation, I can use Bounded_String where the RM says: AdaRM A.4.4(106): Implementation Advice Bounded string objects should not be implemented by implicit pointers and dynamic allocation. And as I said in another post, if I want to use similar memory management for arrays of Long_Float, I use Unchecked_Conversion. (Actually I use a record with the array bounds AND an Unbounded_String object.) -- Robert I. Eachus "Reason and experience both forbid us to expect that national morality can prevail in exclusion of religious principles." -- George Washington