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,d1df6bc3799debed X-Google-Attributes: gid103376,public From: mheaney@ni.net (Matthew Heaney) Subject: Re: Syntax for tagged record types (was Re: Not intended for use in medical,) Date: 1997/05/23 Message-ID: #1/1 X-Deja-AN: 243509190 Distribution: world References: <3.0.32.19970423164855.00746db8@mail.4dcomm.com> <33828299.2A3@world.std.com> <33850721.49BF@sprintmail.com> Organization: Estormza Software Newsgroups: comp.lang.ada Date: 1997-05-23T00:00:00+00:00 List-Id: In article , jsa@alexandria (Jon S Anthony) wrote: >For limited types, the only way around this is to hide them behind >access types for them. Then things again work just fine - except for >storage management issues. Hence, the need for GC. Limited types are >really extremely useful. Unfortunately, much of this is lost without >GC support. But I'm trying to avoid using any heap. If I have to allocate an object, I'd rather it go on the stack. Limitedness forces me to put the object on the heap. Why? It's just a syntactic quirk of the language (the confusion of assignment and initialization) that prevents me from initializing a limited object during its elaboration. If we could eliminate those times when a limited object must be put on the heap, then there would be less motivation for a garbage collector. Safety-critical applications won't use the heap, so let's try to build a more expressive language for use on those kinds of applications. Eliminate the requirement for heap - by adding features (such as constructors) for applicative programming using limited types - and you eliminate the need for a garbage collector. It's not clear to me, though, why you even need GC support. If heap is needed to implement an abstraction, the abstraction writer can sweat all the memory management details by using storage pools and controlled types. What's the problem? -------------------------------------------------------------------- Matthew Heaney Software Development Consultant (818) 985-1271