🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #1067

Re: Creeping feature #769: `new auto'

#1067
From: David Chase
Date: Thu, 02 May 1991 22:47
21 lines
1436 bytes
gyro@kestrel.edu (Scott Layson Burson) writes:
>It struck me today that it would be awfully nice to have a high level,
>type-safe interface to `alloca' (which allocates a block of memory of
>specified size in the caller's stack frame).

>A syntax is easily enough come by: `new auto <type>'.

>This probably won't fly, since `alloca' is not in the ANSI library and
>may be difficult to write for some implementations ...

In theory, there's no need for alloca.  All the machinery needed to
implement running-of-destructors-for-local-objects can be used to
simulate alloca on top of malloc and free.  It's not as efficient, but
it isn't impossible.  Compilers for systems w/o alloca will just need
to work a little harder.

Sigh.  Another feature.  Has anyone considered removing features from
the language instead of adding them?

David Chase
Sun
Technical Details
Message-ID: <12759@exodus.Eng.Sun.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!dali.cs.montana.edu!caen!sdd.hp.com!spool.mu.edu!uunet!lll-winken!sun-barr!newstop!exodus!rbbb.Eng.Sun.COM!chased
References: <1991May2.074928.25507@kestrel.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!dali.cs.montana.edu!caen!sdd.hp.com!spool.mu.edu!uunet!lll-winken!sun-barr!newstop!exodus!rbbb.Eng.Sun.COM!chased
From: chased@rbbb.Eng.Sun.COM (David Chase)
Newsgroups: comp.std.c++
Subject: Re: Creeping feature #769: `new auto'
Keywords: dynamic stack allocation, alloca
Message-ID: <12759@exodus.Eng.Sun.COM>
Date: 2 May 91 22:47:43 GMT
References: <1991May2.074928.25507@kestrel.edu>
Sender: news@exodus.Eng.Sun.COM
Distribution: comp.std.c++
Organization: Sun Microsystems, Mt. View, Ca.
Lines: 21