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,3ccb707f4c91a5f2 X-Google-Attributes: gid103376,public From: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: Java vs Ada 95 (Was Re: Once again, Ada absent from DoD SBIR solicitation) Date: 1996/10/16 Message-ID: #1/1 X-Deja-AN: 189825540 references: <01bbb57f$7fb59020$72663389@billn.logicon.com> <325BC3B3.41C6@hso.link.com> <325D7F9B.2A8B@gte.net> <325FF8D0.6660@io.com> <1996Oct15.150155.1@eisner> <19961016113937528911@dialup120-4-1.swipnet.se> organization: New York University newsgroups: comp.lang.ada Date: 1996-10-16T00:00:00+00:00 List-Id: Lars said No! There must be a way to prevent programs that rely on GC from beeing accepted by a compiler that does not support GC. The designs will be different. GC may well be optional, but there must be a standard way to detect at compiletime that "Error at line 534: Sorry, GC is an optional and not implemented feature, please buy a compiler from one of our competitors instead". Otherwise you can not trust your own program and you can not share your code with others. It might compile and work on one compiler, but compile and fail miserably on another. This is something that I thought would be considered absolutely unacceptable for Ada;-) GC is certainly not just an optimization. GC affects design. You thought wrong. There are many implementation dependent aspects of Ada compilers that affect design (just one of many examples: whether or not mutable variant records are always assigned maximum size, another: whether shared generics are implemented). Code that is required to be portable must steer around such problems, GC would be just one more such problem. The nice thing is that a program written without knowledge of GC will work even if GC is present. At least as much as a program is now portable between different compilers and OS. A program designed with GC in mind will not function without GC, so there must be a way to prevent such a program from compiling where GC is unavailable. Well of course you are talking about "real" GC here and not conservative collectors, which, as we have discussed, can free blocks that are not really free in some circumstances. Also conservative collectors definitely have the possibility of generating programs that compile and work on one compiler, and compile and fail miserably on another compiler, or even on the same compiler later in the same day.