[dmd-internals] Throwing Errors

Leandro Lucarella luca at llucax.com.ar
Thu Mar 15 14:22:13 PDT 2012


Walter Bright, el 14 de marzo a las 16:45 me escribiste:
> >I will submit one piece of evidence toward this. OutOfMemoryError is
> >valid to recover from and is only an error so that @nothrow and other
> >restrictions do not apply to it, as it is always a potential problem.
> >However not doing cleanup could prevent proper recover of OutOfMemory,
> >and yes cleanup itself could fail, oh well.
> 
> OutOfMemory is deliberately made not recoverable, as I've almost
> never seen any application that can successfully recover from it.
> Making it non-recoverable also means that pure functions can
> allocate memory.

Really? It seems that you never worked in a memory constrained system.
There are applications that *really* need to take care about this.

Even you say *almost*, so I guess you actually acknowledge their
existence. If you go this route, please know that you'll make
D a language not suitable for this king of applications.

-- 
Leandro Lucarella (AKA luca)                     http://llucax.com.ar/
----------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------
Please could you stop the noise, I'm trying to get some rest
>From all the unborn chicken voices in my head
What's that...? (I may be paranoid, but not an android)


More information about the dmd-internals mailing list