trusted purity?
Walter Bright
newshound2 at digitalmars.com
Mon Apr 29 11:33:33 PDT 2013
On 4/29/2013 5:08 AM, monarch_dodra wrote:
> I've hit this issue before: In D, if the *managed* memory runs out, then it is
> an error (since then *everything* crumbles: arrays, GC. etc). The reason it is
> an error is that since the memory is managed by the language, there is nothing
> the user can do anyway, so throwing is pointless.
>
> for unmanaged memory, on the otherhand, the user *can* do something about it, so
> throwing is better.
You cannot call a function pure if it sometimes throws a recoverable exception
and sometimes does not, and this is not based on the supplied arguments.
More information about the Digitalmars-d
mailing list