|
![](/i/fill.gif) |
On 4/28/2012 9:52, Warp wrote:
> level were 50,
I understand your argument. I'm unconvinced that you're (a) not already 40
levels of stack deep when you get invoked, and (b) know what your stack
recursion depth can be.
Maybe I'm just used to working on machines with actual limited address space
and RAM. 50 levels of recursion sounds like a lot of stack space used, to me.
> It's highly unusual to require enormous amounts of stack on one single
function call,
I would think that depends on the program. If you're making an image of your
input data for each level, you're screwed, which is why people tend not to
do that sort of thing. If (maybe) you're parsing a programming language, I
can see each level having a fairly large amount of data associated with it.
> would require something like 1024 terabytes of RAM. How likely are you going
> to run out of stack space with that few recursion levels? You could easily
> have that many function calls on the stack even without recursion.)
That's my point! :-)
>> Why does C++ limit the depth of template instantiation required to 17
>> levels, or whatever it is?
>
> Never heard of such a limit.
IIRC, template function nesting is only required to be supported to some
realtively small depth.
--
Darren New, San Diego CA, USA (PST)
"Oh no! We're out of code juice!"
"Don't panic. There's beans and filters
in the cabinet."
Post a reply to this message
|
![](/i/fill.gif) |