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,3727232787ce671e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-05-16 13:16:03 PST Path: archiver1.sj.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsmm00.sul.t-online.com!t-online.de!news.t-online.com!not-for-mail From: Matthias Kretschmer Newsgroups: comp.lang.ada Subject: Re: Universities in the US - Garbage Collector for GNAT? Date: Wed, 16 May 2001 22:12:00 +0200 Organization: Private Message-ID: <20010516221200.4247be5f.McCratch@gmx.net> References: <9drfcr$du11@news-dxb> <9drk4t$hjk$1@news3.cadvision.com> <9drq8e$4ci$1@trog.dera.gov.uk> <9drsqc$mkm$1@nh.pace.co.uk> <9dubnj$jk6$1@nh.pace.co.uk> <20010516210146.7f2a83ac.McCratch@gmx.net> <9dukqo$mmh$1@nh.pace.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: news.t-online.com 990043913 04 25538 4lAOSTlGSEaPVG 010516 20:11:53 X-Complaints-To: abuse@t-online.com X-Sender: 520099920815-0001@t-dialin.net X-Newsreader: Sylpheed version 0.4.63 (GTK+ 1.2.10; i386--freebsd4.3) Xref: archiver1.sj.google.com comp.lang.ada:7589 Date: 2001-05-16T22:12:00+02:00 List-Id: On Wed, 16 May 2001 15:35:50 -0400 "Marin David Condic" wrote: > Well, there are certainly "evil" things you can do in Ada. It's never been > the least bit hard to write bad code in any language. Just for instance: Ada > gives you lots of direct access to the machine (machine code & addresses), > representations of data, multi-tasking, etc. Any of these things can be very > powerful if used judiciously. Its very easy to imagine how with multiple > tasks running in parallel and being used by someone unfamiliar with tasking > how it could easily make a program *very* difficult to maintain or debug! > (Just think of shared access by multiple threads to some resource.) Of course it is always up to the programmer, but most projects aren't done by one programmer and if there are tricks they are used I would say - maybe not all, but they are used. The representation of data is just something you use to give the compiler a hint how to handle it, instructing the compiler to use specific memory-addresses is a "feature" you need in some projects and there it has to be used carefully, in other projects it should be used (so not all addresses should be supported by the OS in a modern multitasking/multiprocessing environment). In my opion you can always do evil things with threads. I should change my comment to: You can do more evil things in language one than in language two. - but this depends on what is considered evil. > > As for Garbage Collection: Observations by one or more compiler vendors seem > to indicate that while occasionally people make noise about it, nobody seems > to want it bad enough to make it a priority. Additionally, Ada typically > uses far less dynamically allocated memory and far fewer pointers than what > programmers commonly use in C/C++. Since in most garden variety programs the > bulk of allocation is static or off the stack, it is less of an issue. > Thirdly, lots of programmers when building their own dynamic data > structures, take advantage of Unchecked_Deallocation and Finalization to > clean up memory that might be hanging around, so garbage collection seems a > lot less necessary. (Assuming that for your implementation, > Unchecked_Deallocation ends up returning the memory to the system - it may > not...) Generally, it just doesn't seem important enough to create a strong > constituency. > Well in some projects it could be usefull and in others you don't need it, but as long as there exists the possibility and usage I won't miss it. :-) - Grown up with Borland Pascal it seems totally natural to deallocate memory for yourself, but sometimes I don't want to think of memory ... - I hoped someone got gnat working with a GC.