dynamically allocating on the stack

Giles Bathgate giles.bathgate at gmail.com
Sat Apr 21 09:54:44 UTC 2018


On Saturday, 21 April 2018 at 07:57:41 UTC, Uknown wrote:
> The language itself doesn't have something.

It would be cool if you could just do

--------
int doSomething(size_t len)
{
     char stackBuffer = push char[len + 1];
     doSomethingElse(stackBuffer);
}
--------

i.e some kind of `push` keyword instead of `new` perhaps its too 
much of an edge case.


More information about the Digitalmars-d-learn mailing list