[dmd-internals] Throwing Errors

Leandro Lucarella luca at llucax.com.ar
Sat Mar 17 03:36:02 PDT 2012


Walter Bright, el 15 de marzo a las 14:27 me escribiste:
> >This is specially bad if a memory allocation fail is an Error. It
> >basically forces you to check every allocation for a failure and
> >translate it yourself to some kind of Exception if you are being careful
> >to write some code that can survive to a memory allocation failure.
> 
> That sounds good in theory, but in practice, almost no program can
> recover from out of memory failure. Even those that pretend they can
> usually cannot because such was never tested.

Do you know failure injection at all? Come on! And you keep saying
"almost", so guess you realize there are people that are actually
capable to write code that can survive to an out of memory error. Kernel
developers for example.

Doesn't make any sense to keep discussing when you obviously have your
position taken here. But please be aware that you are making
D unsuitable for this kind of programs.

> >Why on earth do you want to make life miserable to people that have some
> >valid use case for this, just to avoid corrupting a little more
> >a program that's already corrupted.
> 
> I believe it is a *serious* mistake to believe one can recover a
> program that has become corrupted.

And I believe that thinking that out of memory is corruption is
a *serious* mistake.

-- 
Leandro Lucarella (AKA luca)                     http://llucax.com.ar/
----------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------
No debemos temer a la muerte, porque es la mejor recompensa de la vida.
	-- Ren & Stimpy


More information about the dmd-internals mailing list