From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.6 X-Received: by 2002:a05:622a:181d:: with SMTP id t29mr187307qtc.337.1632926512365; Wed, 29 Sep 2021 07:41:52 -0700 (PDT) X-Received: by 2002:a25:6106:: with SMTP id v6mr154961ybb.531.1632926511871; Wed, 29 Sep 2021 07:41:51 -0700 (PDT) Path: eternal-september.org!reader02.eternal-september.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 29 Sep 2021 07:41:51 -0700 (PDT) In-Reply-To: Injection-Info: google-groups.googlegroups.com; posting-host=146.5.2.231; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC NNTP-Posting-Host: 146.5.2.231 References: <1d2551f4-8189-44ec-a54d-4a56a672bedcn@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Custom Storage Pool questions From: Shark8 Injection-Date: Wed, 29 Sep 2021 14:41:52 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:62866 List-Id: On Wednesday, September 29, 2021 at 1:57:35 AM UTC-6, Dmitry A. Kazakov wrote: > Come on. There never existed Ada compiler with GC. Untrue; GNAT for JVM, and GNAT for DOTNET. > And nobody could even > implement GC with the meaningless semantics of "collections" in the way, > killing objects at random. Either with GC or without it, there must be > no such thing as "collections." How does this follow? The 'element' type cannot go out of scope before the collection, and the collection going out of scope triggers its finalization/deallocation. > > I could see an unsafe language (like C) doing the sort of thing you suggest, > > but not Ada. > How random finalizing user-allocated and user-freed objects is safe? Finalization *isn't* random, it happens at well-defined places. (And, IIRC, is idempotent; meaning that multiple calls have the same effect as a singular call.) > And I suggest doing exactly nothing as opposed to *unsafe*, costly and > meaningless behavior mandated by the standard now. > > Every object in Ada has a specific declaration point, > > initialization point, finalization point, and destruction point. There are > > no exceptions. > Yes, and how it that related to the issue? Because these are the places that finalization (and deallocation/destruction) are defined to happen.