POV-Ray : Newsgroups : povray.off-topic : Teach yourself C++ in 21 days : Re: Days 5- Server Time
29 Jul 2024 12:23:23 EDT (-0400)
  Re: Days 5-  
From: Darren New
Date: 27 Apr 2012 20:38:17
Message: <4f9b3bf9$1@news.povray.org>
On 4/26/2012 5:09, Warp wrote:
>    Very usually the recursion depth of a typical recursive algorithm is
> O(log n). This means that the computer wouldn't be able to hold as much
> data as to make you run out of stack space when running the recursive
> algorithm on it.

Assuming that you're not writing a library that might invoke you 40 levels down.

That said, I've found I rarely need it, and that the undefined behavior 
isn't worth the risks. YMMV. If you can handle the program crashing when you 
give it too much data in a way that generates bogus results, then sure, feel 
free. :-)  (I'm not being sarcastic - there are lots of programs like that.)

-- 
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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.