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,a29f6c543c430f19 X-Google-Attributes: gid103376,public From: Brian Rogoff Subject: Re: GC - again, :-) Date: 1997/04/30 Message-ID: #1/1 X-Deja-AN: 238491498 References: Newsgroups: comp.lang.ada Date: 1997-04-30T00:00:00+00:00 List-Id: On 29 Apr 1997, Jon S Anthony wrote: > Robert Eachus sez: > > Robert Dewar said: > > > > > What I think would be a nice compromise is to have a storage pool > > > specially for unbounded strings (or similar gizmos) where you got > > > GC in that storage pool -- something to keep looking at ... > > This is definitely something to pursue. What is more, I think you can > generalize this notion. I'm working on this sort of thing right now. I've been looking at something similar, since I've been writing an interpreter for a Lisp-like language in Ada. Obviously I can write a GC for a set of objects as part of the interpreter proper, since I know the lifetimes of many objects, and all of the roots, but I'd prefer to be able to say something like type SExpr_ID is access all SExpr_Type'Class; for SExpr_ID'Storage_Pool use Garbage_Collected_Pool; ... -- These are ugly, but might be useful Register_Root ( Garbage_Collected_Pool, Root_1 ); ... Register_Root ( Garbage_Collected_Pool, Root_n ); and thus be able to reuse the collector easily in other contexts. > > This is definitely an area where the language can and should > > evolve. Ada.Strings.Unbounded is a nice package to have, but a > > generic which exported a Garbage_Collected type would be even more > > useful in places: > > Absolutely. I am working on a whole set of these (related in > subsystem hierarchies) which will offer wide ranges of GC options. > While you can't do this completely transparently *within* the language > (i.e., without compiler support), it is surprising how close you can > in fact get. What is more, it is very efficient and very flexible. Well, now I'm curious! Do you have working source code? -- Brian