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 A Duff Subject: Re: Ammo-zilla Date: 1999/11/01 Message-ID: #1/1 X-Deja-AN: 543090287 Sender: bobduff@world.std.com (Robert A Duff) 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> <7vadsp$8q61@news.cis.okstate.edu> <1999Oct28.221910.1@eisner> <7vb3c4$8a21@news.cis.okstate.edu> <7vhg2n$7ht$1@nnrp1.deja.com> Organization: The World Public Access UNIX, Brookline, MA Newsgroups: comp.lang.ada Date: 1999-11-01T00:00:00+00:00 List-Id: Robert Dewar writes: > By the way, speaking as someone quite familiar with garbage > collection (remember I chaired WG2.1 for many years, and > was responsible for the SPITBOL compilers -- see for example > the 1977 paper in SP&E that discusses a new GC algorithm used > very successfully in SPITBOL), I find the mixture of low level > system facilities, including those that let you break the type > model, and GC to be very worrisome, sounds like it can easily > create a debugging nightmare. Note that one of the reasons that > GC can succeed in Java is the extremely limited nature of the > language. GC is more practical in Ada if you severely restrict > the subset of Ada you support, and eliminate for instance > stuff like Unchecked_Conversion and address overlays. > > What for instance does it mean to do address overlays that > reference the address of some object if the address of that > object changes due to GC? I have no idea what a sensible answer > to this question might be! I think most languages (or implementations thereof) today that support garbage collection also have interfacing-to-C capabilities, which introduces all the issues you're worried about. If you pass pointers into the C world, you end up pinning down objects "by hand" and so forth, and yes, it is error prone and possibly inefficient. I understand your concern, but I don't think it's all that bad -- I don't think it's unreasonable to have Unchecked_Conversion of pointers and garbage collection in the same language. You have to be careful, and you have to minimize and isolate the low-level stuff. After all, the mere existence of Unchecked_Conversion doesn't cause any problems -- you have to *use* it to cause trouble, and that's a programmer's choice. - Bob