Does 'D' language supports 'C' like VLA?

via Digitalmars-d digitalmars-d at puremagic.com
Tue Apr 14 00:34:26 PDT 2015


On Tuesday, 14 April 2015 at 07:30:22 UTC, bearophile wrote:
> Generally you prefer something that's guaranteed to be 
> allocated on the stack when it's small and there's enough 
> stack. An array allocation annotated with "scope", perhaps.

VLAs can save stackspace compared to fixed max sized arrays, but 
add recursion and try to figure out the right threshold between 
small and large? You can't? So you need whole program analysis...


More information about the Digitalmars-d mailing list