On 6/9/06, Ronald G Minnich <[email protected]> wrote:
Latchesar Ionkov wrote:
> Another example is using emalloc in libraries. I agree that it is  much
> simpler to just give up when there is not enough memory (which  is also
> not very likely case), but is that how the code is supposed  to be
> written if you are not doing research?

yes, that is a problem with a lot of code. "Just bail on first error" --
we've had to stop using emalloc here because that is very unrealistic
for production support.

ron


Well I wonder what people typically do when they can't malloc anymore
memory but need more... A reasonable thing to do is to die I'd think.

In fact if you use Perl "die" is even a part of the lang.

my $a = 5 or die;
print "hello, world\n" or die;

^^ Valid, "draconian" perl?

Reply via email to